Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set up JAVA_HOME environment variable?

Status
Not open for further replies.

yinny

Programmer
Jan 11, 2002
5
GB
Hi,

I have JDK1.3.1_01 and Tomcat4.0 installed. I've also set the following variables in autoexec.bat:

SET JAVA_HOME=C:\JDK1.3.1_01
SET CATALINA_HOME=C:\TOMCAT\APACHETOMCAT4.0

But when I tried to start up tomcat, it said
"You must set JAVA_HOME to point at your Java Development Kit installation."

I don't understand why as what I put in the path is exactly pointing at where i install my jdk. It'll be very helpful if anyone can show me how to solve this. Thanks! =)
 
You may need to point it at the bin directory. So the line would read:
SET JAVA_HOME=C:\JDK1.3.1_01\bin
 
JAVA_HOME should point to the root of your java installation, in your case c:\jdk1.3.1_01

What OS are you running? Did you restart the system after changing the autoexec.bat? Did you try to verify that the variables were set correctly by opening a command prompt and typing:

echo %JAVA_HOME%

If you are running Win9.x, the autoexec.bat is the place for your env variables. If you are using an NT variant you should set these in the system applet in the control panel.

Regards,

Charles
 
BTW, I think that I've seen traffic on the tomcat mailing list that tomcat 4.0 has had problems finding JAVA_HOME, among other things. You may want to bubscribe and post a message if you are still having issues. Tomcat 4.0 has had alot of issues and IMHO isn't production ready. YMMV.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top