Friday, 30. May 2008, 02:25:59
First you have to get the kit either from
http://java.sun.com or rndfileserver. Then do as follow:
1. If the kit file you have is a file with .bin extension, then you have to extract it first to get the original file. Assume that you don't have the excutable permission on the file:
chmod +x j2sdk1.4.2_02.bin
Then:
./j2sdk1.4.2_02.bin
2. After you have the installation file (usually .rpm file), login as root (use su -) then install it:
rpm -ivh j2sdk1.4.2_02.rpm
3. When the installtion had been finished, now the time for you to set up the java enviroment, hence you can eat soup everywhere you like

From your home directory (e.g. /home/nhnhat), edit the file .bash_profile with vi editor (note that this is a hidden file with a dot '.' prefix):
vi .bash_profile
4. Then add the following lines to the file:
PATH=$PATH:/usr/java/j2sdk1.4.2_02/bin
export JAVA_HOME=/usr/java/j2sdk1.4.2_02
export CLASSPATH=/usr/java/j2sdk1.4.2_02/lib/tools.jar:/usr/java/j2sdk1.4.2_02/jre/lib/rt.jar
save the file then restart the system.
5. Finally, time to test for your work. Open the terminal and type "java" everywhere you like, you'll see the result

Note: the file name of this article is just my assumtion using j2sdk1.4.2_02, replace it with your real file.