Install JDK

This information is now maintained on my wiki http://www.mikepalmer.net/wiki/ApacheTomcatHowto.

  1. go to http://java.sun.com and download the current version of J2SDK
  2. Install the J2SDK. I copied the .bin file from the previous step to /usr/local/, then ran it:
    cp -p j2sdk-1_4_2_03.bin /usr/local/
    ./j2sdk-1_4_2_03.bin
    This leaves /usr/local/j2sdk-1_4_2_03.
  3. Set JAVA_HOME as an environment variable, pointing to the location of the J2SDK you just installed, in this case /usr/local/j2sdk-1_4_2_03. If you want this environment variable to be available to every user system-wide, then put the following two lines into /etc/profile:
    JAVA_HOME=/usr/local/j2sdk-1_4_2_03
    export JAVA_HOME
  4. Verify that JAVA_HOME is set:
    echo $JAVA_HOME
    You should see the value /usr/local/j2sdk-1_4_2_03 returned. If you don't, go back through the steps until JAVA_HOME resolves to the correct value.
  5. Set your CLASSPATH
    CLASSPATH=${JAVA_HOME}/lib/tools.jar:${JAVA_HOME}/jre/lib/ext/mail.jar:${JAVA_HOME}/jre/lib/ext/activation.jar
    export CLASSPATH

Back to Apache Main Continue to Tomcat