This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JSP and the fly likes JAVA_HOME environment variable is not defined Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "JAVA_HOME environment variable is not defined" Watch "JAVA_HOME environment variable is not defined" New topic
Author

JAVA_HOME environment variable is not defined

Rob Petterson
Ranch Hand

Joined: Jan 23, 2002
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?


Rob Petterson
SCJP
inam paki
Greenhorn

Joined: Jul 30, 2002
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;


inampaki
Rob Petterson
Ranch Hand

Joined: Jan 23, 2002
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

Joined: Jan 23, 2002
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

Joined: Jul 26, 2001
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


<a href="http://www.samjdalton.com" target="_blank" rel="nofollow">Sam Dalton</a>,<br />Co-author of [http://www.amazon.com/exec/obidos/tg/detail/-/1590592255/qid=1068633302//ref=sr_8_xs_ap_i0_xgl14/104-4904002-9274339?v=glance&s=books&n=507846]Professional JSP 2.0[/URL] (October 2003)<br />Co-author of <a href="http://www.amazon.com/exec/obidos/ASIN/1861007701/ref=ase_electricporkchop" target="_blank" rel="nofollow">Professional SCWCD Certification</a><br />Co-author of <a href="http://www.amazon.com/exec/obidos/ASIN/186100561X/ref=ase_electricporkchop" target="_blank" rel="nofollow">Professional Java Servlets 2.3</a>
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
I hope you remembered to reboot your PC when you changed the "autoexec.bat" file!


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
 
GeeCON Prague 2014
 
subject: JAVA_HOME environment variable is not defined