- Download jdk(jdk-6u33-linux-i586-rpm.bin) from Java Sun
- cd /root
- cp jdk-6u33-linux-i586-rpm.bin /usr/local
- cd /usr/local
- chmod +x jdk-6u33-linux-i586-rpm.bin
- ./ jdk-6u33-linux-i586-rpm.bin
- Test JDK
- By default Java will be installed to /usr/java/jdk1.6.0_33/
- /usr/java/jdk1.6.0_33/bin/java -version
- Choosing JDK
- alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_33/bin/java 2
- alternatives --config java
There are 3 programs which provide 'java'.
Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/jre-1.6.0-openjdk/bin/java
2 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
3 /usr/java/jdk1.6.0_33/bin/java
Enter to keep the current selection[+], or type selection number: 3
Done!