Setting Up the Java Environment

Apache Tomcat requires a Java Runtime Environment (JRE) from J2SE version 6 or later.

To install and set up a JRE on the target machine:

  1. Download the Java 2 Standard Edition JRE 6, from http://www.oracle.com/technetwork/java/javase/ downloads/index.html.
  2. Install the JRE on the target machine according to the instructions in the download package.
  3. Set an environment variable named JRE_HOME to the directory into which you installed the JRE. The default installation locations are:
    Windows users
    C:\Program Files\Java\<JRE_version>
    Linux users
    <JRE_version> in the directory where the JRE self-extracting binary was run.
  4. Append JRE_HOME/bin to the PATH environment variable.
Note: You can use the full Java Development Kit (JDK) rather than just the JRE. In this case, set the JAVA_HOME environment variable (not JRE_HOME) to the directory into which you installed the JDK, and append JAVA_HOME/bin to the PATH environment variable.