2013年9月9日 星期一

Install Sun Java JDK 6 in ubuntu 16.04

Download:
https://www.oracle.com/java/technologies/javase-java-archive-javase6-downloads.html
filename: jdk-6u45-linux-x64.bin

chmod 755 jdk-6u45-linux-x64.bin

#rename
sudo mv jdk1.6.0_45 java-6-oracle

#if jvm not exist then make directory
sudo mkdir /usr/lib/jvm

#move dir and files
sudo mv java-6-oracle /usr/lib/jvm

wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/webupd8/update-java-0.5b
chmod 755 ./update-java-0.5b
./update-java-0.5b
#select
/usr/lib/jvm/java-6-oracle

update-alternatives --remove java /usr/lib/jvm/java-6-oracle/bin/java

update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-6-oracle/jre/bin/java 1073
update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-6-oracle/bin/javac 1073
update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/java-6-oracle/bin/javadoc 1073

Ref: 
https://askubuntu.com/questions/67909/how-do-i-install-oracle-jdk-6

沒有留言:

張貼留言