This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Installing Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Installing Tomcat" Watch "Installing Tomcat" New topic

Installing Tomcat

Sanjeev Shahi
Ranch Hand

Joined: Feb 26, 2001
Posts: 83
I've downloaded tomcat and unzipped it. Now when I dobleclick startup.bat I am getting following error cannot find file -Djava.endorsed.dir....
where I've to specify JAVA_HOME ? And what else I've to do to run tomcat?
I've downloadeds 4.1.12
Sanjeev Shahi
Ranch Hand

Joined: Feb 26, 2001
Posts: 83
FYI I downloaded
following zip file
from following site .............

Timothy Stone
Ranch Hand

Joined: Aug 01, 2001
Posts: 71
you got the zip... expanded it. and double-clicked the startup.bat.
The full answer of course can be found at the Tomcat home page Jakarta Tomcat... but the short answer is:
Windoze: at a command prompt:

To permanently set this in Windoze 2k and above:
Open the Properties sheet for My Computer:
Right-click on My Computer > Properties > Advanced Tab > Environment Variables
Do the same as above but add a new System Variable with the name of JAVA_HOME and a value as shown above.
Then edit the PATH System variable as shown above to include the bin directory of your Java SDK.
UNIX is a variant of this but since the variants set paths differently I'll cover Bash:
In your home directory edit the .bash_profile file to include something like:

Of course all this is moot if you do not have the Java SDK installed. This is not the same as the JRE! Get the full Software Development Kit (SDK) for Java from the Sun website. v1.3x and 1.4x are fine. Tomcat 4.1.12 is 1.4 ready. The LE download of Tomcat is optimized for 1.4 by the way.
Hope this helps,

Timothy Stone, MIT, SCJP
"This Satan's drink [coffee] is so delicious, we shall cheat Satan and baptize it." --Pope Clement the VIII (1592-1605)
Sanjeev Shahi
Ranch Hand

Joined: Feb 26, 2001
Posts: 83
Thanks it worked. Now I want use manager application. when I start tomcat and then add following lines to server.xml
<Context path="/manager" debug="0" privileged="true" docBase="/jakarta-tomcat-4.1.12/server/webapps/manager">
my manager application works but while try to shutdown the tomcat it gives error. Also it does not restart. Do you know where is exact place to add above lines or I've to make changes to existing lines in server.xml.
I agree. Here's the link:
subject: Installing Tomcat
jQuery in Action, 3rd edition