File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes setting java_home in catalina.bat file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "setting java_home in catalina.bat file" Watch "setting java_home in catalina.bat file" New topic

setting java_home in catalina.bat file

dimpsonu arora
Ranch Hand

Joined: Aug 13, 2003
Posts: 51
Dear Sir/Madam,
I am using Apache Tomcat web server 4.0.6.
I need to set Java_Home variable. Is it in catalina.bat file.Please tell me how to set java_home variable and where is that in the file catalina.bat.Do we need to set catalina.bat file or some other file.I am using jdk 1.3 which is in c:/jdk1.3 and My jre is in c:/jdk1.3/bin. Please help me.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63870

Moving to Tomcat forum.

[Asking smart questions] [About Bear] [Books by Bear]
ernest fakudze
Ranch Hand

Joined: Aug 27, 2001
Posts: 216
Download the latest version of Tomcat. I think it's version 4.1.27. When you install it, it will automatically detect the Java_Home directory and no problems. Then you should have icons to start and stop the Tomcat server.

In a time of drastic change it is the learners who inherit the future. The learned usually find themselves equipped to live in a world that no longer exists.<br />Eric Hoffer
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
If you are doing a lot of Java you might as well set the JAVA_HOME environment variable for all applications. In Windows thats done from the System dialog in the Control Panel. Pick the "Advanced" tab - then the "Environment Variables" button. JAVA_HOME should point to the SDK installation directory - mine looks like this:
I also like to set CATALINA_HOME by hand rather than have the batch file set it.
wood burning stoves
subject: setting java_home in catalina.bat file
It's not a secret anymore!