close
reference form:
http://stackoverflow.com/questions/9741293/error-installing-java-on-ubuntu-10-64bit
The problem is that you should now download JDK manually. Somewhere I found these steps and it worked fine in my case:
- Download Java SE 6 JDK for Linux x86 self-extracting binary (if you work with 32bit platform)
- From the download folder, make the file executable
chmod a+x jdk-6u<version>-linux-i586.bin
- Move the file to the jvm folder
sudo mv jdk-6u<version>-linux-i586.bin /usr/lib/jvm/
- Change to the jvm folder and run the self-extracting binary
cd /usr/lib/jvm
sudo ./jdk-6u<version>-linux-i586.bin
- Everything will be extracted to a new jdk1.6 folder and you can delete the .bin file now.
- Make a symbolic link to the new java binary in the alternatives folder.
sudo ln -s -b /usr/lib/jvm/jdk1.6<version>/jre/bin/java /etc/alternatives/java
-
Append in your ~/.bashrc
JAVA_HOME=/usr/lib/jvm/jdk1.6.<version>/
PATH=$PATH:$JAVA_HOME/bin
-
Double-check the version
java -version
Remember that you can work only with JDK v6 version.
全站熱搜