Installing j2sdk....
Set the PATH and JAVA_HOME environment variables: (/etc/profile, $HOME/.bashrc or $HOME/.bash_profile).
PATH=$PATH:/usr/java/j2sdk1.4.2_03/bin
JAVA_HOME=/usr/java/j2skd1.4.2_03
export PATH
A reference to the current directory will probably need to be added to your CLASSPATH. Add ":." to the end of your CLASSPATH. Relog into your shell. Now you should be able to access java like this:
# java -version
