Two Laptop Bag
The moose likes Tomcat and the fly likes Make CLASSPATH work in Tomcat 4.1.12 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Make CLASSPATH work in Tomcat 4.1.12" Watch "Make CLASSPATH work in Tomcat 4.1.12" New topic

Make CLASSPATH work in Tomcat 4.1.12

Justin Chu
Ranch Hand

Joined: Apr 19, 2002
Posts: 209
How to do that?
I know that Tomcat 4.x doesn't use System CLASSPATH, I want to force it to use it.. It isn't too much to ask?
I've tried editing file but I get

[ November 13, 2002: Message edited by: Chu Tan ]
Justin Chu
Ranch Hand

Joined: Apr 19, 2002
Posts: 209
To elaborate the problem I'm facing.
I've many machines with tomcat installed. These tomcat instances would like to share a common set of jars on a networked drive.
If I use Tomcat's recommended method, I've to copy the jars to all the servers whenever there's an update.
System CLASSPATH doesn't work in Tomcat 4.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Rather than 'forcing' Tomcat to do something that it was designed to specifically not do (and for a reason), and rather than introducing a single point of failure for multiple boxes (oops.. that network share went down)..

How about making the laborious process of deploying multiple jars to multiple places a breeze? Sounds like a job for ANT.

Joined: Feb 25, 2002
Posts: 20
You can point to whatever classpath you want by modifying the setClasspath.bat file in the bin directory.
I have had simular situations in which I map the network drive and use a drive letter in my classpath setting. The one major benefit of having tomcat use its own classpath rather than the system classpath is that tomcat won't crash if someone else logs into the machine and changes the enviroment variables. Personally, I set the catalina home and java home variables in the top of startup.bat, then in setclasspath.bat I set any classpath settings I need.
HOpe that helps. I can paste in my files as examples if you still need help.
I agree. Here's the link:
subject: Make CLASSPATH work in Tomcat 4.1.12
It's not a secret anymore!