Due to Oracle's bullsh*t redistribution license it's not possible to install Sun Java 7 with the apt packaging manager.
So to install, we need to do a bit a manual malarchy
$ sudo -s
# cd /opt
# wget http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.tar.gz
# tar xvf jdk-7-linux-x64.tar.gz
# update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_17/bin/java 1
# update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_17/bin/javac 1
# update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.7.0_17/jre/lib/amd64/libnpjp2.so 1
# update-alternatives --set java /opt/jdk1.7.0_17/bin/java
# update-alternatives --set javac /opt/jdk1.7.0_17/bin/javac
# update-alternatives --set mozilla-javaplugin.so /opt/jdk1.7.0_17/jre/lib/amd64/libnpjp2.so
Now test that it's worked:
# java -version
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
Job done!
HTH
No comments:
Post a Comment