wood burning stoves
The moose likes Tomcat and the fly likes embedded 5.0.30 set env variables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "embedded 5.0.30 set env variables" Watch "embedded 5.0.30 set env variables" New topic

embedded 5.0.30 set env variables

g randecker

Joined: Jun 21, 2006
Posts: 2
Using embedded Tomcat v. 5.0.30 in a desktop application that will be rolled out to several users. I had been using Tomcat standalone but found that coordinating the browser startup with the Tomcat init was tricky, so I decided to go this route.

My problem is that I am having trouble setting the environment variables in a way that the Jasper can find it. Previously as a standalone, the program started with a bat file that set all variables and then called to the startup.bat for Tomcat. This worked.

Now I have tried several different ways, and none work. I am staying away from setting the env variables permanently since I don't want to honk up any other programs that might use JAVA_HOME.

This is what I've tried that seemed the most promising... setting the variables in a bat file and then using that bat file to call the java program that creates the embedded engine and starts tomcat.

NOTE: %DIRT_JAVA_HOME% is set when the program is installed and is = C:\Program Files\Java\jdk1.5.0_06 I use this since it won't interfere with other programs using JAVA_HOME

g randecker

Joined: Jun 21, 2006
Posts: 2
This appears to be a case of asking the wrong question. Although the error says that the JAVA_HOME does not point to the JDK, even if you set the JAVA_HOME as a permanent environment variable (as I did out of frustation), it still throws the error.

So the solution I've found is to address this part of the error message:

Here are the steps that ultimately fixed my problem...
1) copy the tools.jar file from the <JAVA_HOME>/lib to <TOMCAT_HOME>/lib (there is no common/lib in 5.0.30, only ./lib)
2) change the calling .bat file


and thereby assure that the tools.jar is now in the JVM's classpath.
I agree. Here's the link: http://aspose.com/file-tools
subject: embedded 5.0.30 set env variables
It's not a secret anymore!