1. download the .bin runnable file from sun.
2. use chmod and change the .bin to executable mode.
3. run it. example: ./jdk1.6.0_06.bin
and then it will install itself.
But CentOS use redhat jdk under /usr/bin/java
you can check it with this command: which java
To change this environment setting for bash shell, add this to your [userhome]/.bashrc
if you install your jdk to /root/jdk1.6.0_06, the result will be
beware the difference between linux and windows (since I am windows user).
windows use “;”, linux use “:”