1.Download the Sun JDK package from the Java website and install as follows (see Table 1 (page 12) for the correct version and website link):

Change to the Sun JDK install package directory, as appropriate for your system, and install the package by entering the following command:

#chmod 755 jdk-1_5_0_10-linux-amd64-rpm.bin

#./jdk-1_5_0_10-linux-amd64-rpm.bin

2.Create a symbolic link for Sun JDK by entering the following:

#ln -s /usr/java/jdk1.5.0_10 /usr/local/jdk

3.The JAVA_HOME environment variable must be properly set before stack components, such as Tomcat, can begin executing.

To export the JAVA_HOME environment variable, modify the system file that is appropriate for your shell, /etc/profile.d/alljava.sh or /etc/profile.d/alljava.csh:

For the alljava.sh file, add the following lines:

if [ -x /usr/local/jdk/bin/java ] ; then

export PATH=$PATH:/usr/local/jdk/bin export JAVA_BINDIR=/usr/local/jdk/bin

export JAVA_ROOT=/usr/local/jdk export JAVA_HOME=/usr/local/jdk export JRE_HOME=/usr/local/jdk unset JDK_HOME

unset SDK_HOME

export JDK_HOME=/usr/local/jdk export SDK_HOME=/usr/local/jdk

else

if [ -x /usr/lib/java/jre/bin/java ] ; then

#it is IBMJava2-JRE or SunJava2-JRE export PATH=$PATH:/usr/lib/java/jre/bin export JAVA_BINDIR=/usr/lib/java/jre/bin export JAVA_ROOT=/usr/lib/java

export JAVA_HOME=/usr/lib/java/jre export JRE_HOME=/usr/lib/java/jre unset JDK_HOME

unset SDK_HOME

fi

fi

For the alljava.csh file, add the following lines:

if ( -x /usr/local/jdk/bin/java ) then setenv PATH ${PATH}:/usr/local/jdk/bin setenv JAVA_BINDIR /usr/local/jdk/bin setenv JAVA_ROOT /usr/local/jdk setenv JAVA_HOME /usr/local/jdk setenv JRE_HOME /usr/local/jdk unsetenv JDK_HOME

unsetenv SDK_HOME

setenv JDK_HOME /usr/local/jdk setenv SDK_HOME /usr/local/jdk

else

if (-x /usr/lib/java/jre/bin/java)then #it is IBMJava2-JRE or SunJava2-JRE setenv PATH ${PATH}:/usr/lib/java/jre/bin setenv JAVA_BINDIR /usr/lib/java/jre/bin setenv JAVA_ROOT /usr/lib/java

setenv JAVA_HOME /usr/lib/java/jre setenv JRE_HOME /usr/lib/java/jre unsetenv JDK_HOME

unsetenv SDK_HOME endif

endif

16

Page 16
Image 16
HP 5991-5565 manual # ln -s /usr/java/jdk1.5.010 /usr/local/jdk, For the alljava.sh file, add the following lines