# JAVA_HOME environment variable is not defined

Rob Petterson
Ranch Hand
Posts: 149
That's the error I get when I try and run the startup file for Tomcat 4.1.12 in win95.
Any ideas?

inam paki
Greenhorn
Posts: 14
Hi;
U better add these two following Lines in ur autoexec.bat file:
let's Suppose U installed jdk under C:\jdk1.3
and tomcat under C:\Tomcat
then
set JAVA_HOME=C:\jdk1.3;
set TOMCAT_HOME=c:\Tomcat;

Rob Petterson
Ranch Hand
Posts: 149
Thanks Inam,
I'll try it tomorrow when I get to work. I'll let you know how I got on then.

Rob Petterson
Ranch Hand
Posts: 149
Well, I'm at work and have added the code to my autoexec.bat file. Still comes up with the same error, I'm afraid
I think I might re-install the Tomcat download, as I've heard this can sometimes resolves the problem. Can someone tell me the exact URL for Tomcat dowload, just to make sure that I am dowloading the right one.
Thanks

Sam Dalton
Author
Ranch Hand
Posts: 170
Rob,
If you still haven;t sorted this out, try doing the following:
1) Open a command prompt window
2) type SET JAVA_HOME=path_to_your_jdk (e.g. set JAVA_HOME=c:\j2sdk1.4)
3) start tomcat using the startup.bat script in the bin directory.
Cheers
Sam

Frank Carver
Sheriff
Posts: 6920
I hope you remembered to reboot your PC when you changed the "autoexec.bat" file!

 Consider Paul's rocket mass heater.