wiki:GIS/InstallationGuidelines/Linux/Java/Debian7

Installing Java for Debian 7 Wheezy

# Remove OpenJDK & dependent packages
apt-get remove openjdk-6-jre-lib
# Install a fake package to tell Debian that a valid Java is installed
wget http://babel.ls.fi.upm.es/~vpablos/others/packages/debian/oracle-java-pkg-for-debian_2.0.0+r20140717_all.deb
dpkg -i oracle-java-pkg-for-debian_2.0.0+r20140717_all.deb
# Download Sun Java via Browser (need to accept T&C)
# http://www.oracle.com/technetwork/java/javase/downloads/server-jre7-downloads-1931105.html
http://download.oracle.com/otn-pub/java/jdk/7u80-b18/server-jre-7u80-linux-x64.tar.gz
mkdir /usr/lib/jvm
cd /usr/lib/jvm
tar zxvf /tmp/server-jre-7u80-linux-x64.tar.gz
ln -s /usr/lib/jvm/jdk1.7.0_80 /usr/lib/jvm/java-sun
rm /usr/bin/java
ln -s /usr/lib/jvm/java-sun/bin/java /usr/bin/java
rm /usr/bin/javac
ln -s /usr/lib/jvm/java-sun/bin/javac /usr/bin/javac

vi /etc/profile.d/java
JAVA_HOME=/usr/lib/jvm/java-sun
export JAVA_HOME
Last modified 8 years ago Last modified on 06/13/16 13:26:09
Note: See TracWiki for help on using the wiki.