# /usr/sbin/alternatives --install /usr/bin/java java /usr/java/jre1.5.0_09/bin/java 1509
//use numerals representing the correct version of java in the above line
# alternatives --config java
//select suns java version
# java -version
Something else I dug up, have root add the 4 items to the end of /etc/bashrc and it seems to work great.
Reading the documentation that comes with the JDK, we find that there is no need to set the CLASSPATH or JDK_HOME environments. Whilst this is true for the JDK itself, I have found that there are some applications that expect these environments to be set. In any case setting them will not cause you any harm and I recommend you take the following steps to install the JDK correctly:
- export PATH=$PATH:{JDK_HOME}/bin
- export JDK_HOME={JDK_HOME}
- export JAVA_HOME={JDK_HOME}
- export CLASSPATH=./:{JDK_HOME}/lib/classes.zip