1、下载 jdk-6u37-linux-i586.bin
2、chmod 755 jdk-6u37-linux-i586.bin
3、sudo ./jdk-6u37-linux-i586.bin
4、sudo vi /etc/environment
修改内容为:
- PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/ubuntu/jdk1.6.0_37/bin"
- CLASSPATH=.:/home/ubuntu/jdk1.6.0_37/lib
- JAVA_HOME=/home/ubuntu/jdk1.6.0_37
5、source /etc/environment
6、java -version