Setting JAVA_HOME and CATALINA_HOME
Before running Tomcat on your computer, the JAVA_HOME and CATALINA_HOME environmental variables must be set correctly.
- If you do not currently have the JAVA_HOME and CATALINA_HOME environmental variables defined or are unsure about whether they are defined correctly, complete the following steps to do that.
For Windows 95, 98, or ME
- Make a backup of your autoexec.bat file.� (As you may have more than one autoexec.bat file on your system, ensure that you are working with the autoexec.bat file that is on your main booting device, for example, C:\autoexec.bat.)
- Using Notepad (or any other plain text editor), edit your autoexec.bat file.
- At the end of the autoexec.bat file, type set JAVA_HOME=�path� (where �path� is the path to your JVM, e.g., C:\Program Files\Java).
- On the next line of the file, type set CATALINA_HOME=�path� (where �path� is the path to Tomcat, e.g., C:\Program Files\Apache Tomcat 4.0).
- Save the autoexec.bat file by selecting File and then Save.
- Close the editor window.
- Restart your computer.
- Complete
For Windows 2000
- Right click on My Computer.
- Select Properties.
- Select the Advanced tab.
- Select the Environmental Variables button.
- Under the System Variable group, select New.
- In the Variable Name field, type JAVA_HOME.
- In the Variable Value field, type the name of the path to your JVM (e.g., C:\Program Files\Java).
- Select OK.
- Under the System Variable group, select New.
- In the Variable Name field, type CATALINA_HOME.
- In the Variable Value field, type the name of the path to Tomcat (e.g., C:\Program Files\Apache Tomcat 4.0).
- Select OK.
- Select OK.
- Select OK.
- Complete
For Windows NT
- Right click on My Computer.
- Select Properties.
- Select the Environment tab
- In the Variable Name field under the User Variables for Administrator group, type JAVA_HOME.
- In the Variable Value field under the User Variables for Administrator group, type the name of the path to the JVM (e.g., C:\Program Files\Java).
- Select Set.
- In the Variable Name field under the User Variables for Administrator group, type CATALINA_HOME.
- In the Variable Value field under the User Variables for Administrator group, type the name of the path to Tomcat (e.g., C:\Program Files\Apache Tomcat 4.0).
- Select Set.
- Select OK.
- Complete
For Unix-compatible environments
- Export the JAVA_HOME Environmental Variable (e.g., type
export JAVA_HOME=/usr/java/j2sdk1.4.1 in the terminal window). - Export the CATALINA_HOME Environmental Variable (e.g., type
export CATALINA_HOME=/usr/local/jakarta-tomcat-4.0.5 in the terminal window). - Complete
No comments:
Post a Comment