Setting JAVA_HOME
Windows
- Right click on the 'My Computer' icon, select 'Properties', and click on 'Advanced'.
- Click on 'Environment Variables'.
- Under 'System variables', click 'New'.
- 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).
Linux
Assuming that dir is the directory containing Java (e.g. /usr/java/jdk1.5):
- For bash users, run
export JAVA_HOME=dir
- For tcsh users, run
setenv JAVA_HOME dir
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