Setting JAVA_HOME

Windows

  1. Right click on the 'My Computer' icon, select 'Properties', and click on 'Advanced'.
  2. Click on 'Environment Variables'.
  3. Under 'System variables', click 'New'.
  4. Add a new variable with name JAVA_HOME and the value being the directory containing Java (e.g. C:\Program Files\Java\jdk1.5.0_04).
JAVA_HOME on Windows

Linux

Assuming that dir is the directory containing Java (e.g. /usr/java/jdk1.5): The instruction can appropriately be placed in ~/.bash_profile or ~/.tcshrc to make sure that it is executed whenever a new shell is started.

back to the Tomcat installation guide