next up previous contents
Next: Testing Java 2 SDK Up: The Java Environment Previous: The Java Environment

Installing Java 2 SDK

First thing to do is to get Sun's JavaTM 2 Platform, Standard Edition, the current release is version 1.3.1. The JavaTM 2 Platform enables you to run and compile java programs!

The simplest way of installing is to get the RedHat rpm's, your linux distribution has to support installing rpm's to be able to install this version. (j2sdk-1_3_1-linux-i386-rpm.bin 25,450,562 bytes)

If your linux distribution doesn't support rpm's you have to get the GNUZIP Tar version.(j2sdk-1_3_1-linux-i386.bin 26,924,751 bytes)

The installation information can be found as a link on the download page.

After installing make sure you have set your CLASSPATH and your JAVA_HOME dir correctly. We have done this by editing the /etc/profile file. Just add:

   PATH="$PATH:/usr/java/jdk1.3/bin"
   CLASSPATH="$CLASSPATH:/usr/java/jdk1.3/lib"
   JAVA_HOME="/usr/java/jdk1.3"
   TOMCAT_HOME="/usr/tomcat"
at the beginning of the /etc/profile file, and:
   export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC 
          CLASSPATH JAVA_HOME TOMCAT_HOME
at the end of the file. Now everytime someone logs in to the computer these variables are already set.

Logout and login as root or any other user and use set to check if your settings are ok, mine are:

   [rmorrien@escay public_html]$ set
   BASH=/bin/bash
   BASH_ENV=/home/rmorrien/.bashrc
   BASH_VERSINFO=([0]="2" [1]="04" [2]="11" ...
   BASH_VERSION='2.04.11(1)-release'
   CLASSPATH=:/usr/java/jdk1.3/lib
   COLORS=/etc/DIR_COLORS
   COLUMNS=87
   ...
   JAVA_HOME=/usr/java/jdk1.3
   ...
Here you can see that the CLASSPATH and the JAVA_HOME are set. Try:
   [rmorrien@escay public_html]$ pwd
   /home/rmorrien/public_html
   [rmorrien@escay public_html]$ cd $JAVA_HOME
   [rmorrien@escay jdk1.3]$ pwd
   /usr/java/jdk1.3
   [rmorrien@escay jdk1.3]$
as you can see the variables are set correctly.


next up previous contents
Next: Testing Java 2 SDK Up: The Java Environment Previous: The Java Environment
Copyright © 2001, R.M. Morriën, H.P.A.M. Snoek, M.A.C. Bakker