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
Joined: Jun 21, 2006
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 from:
and thereby assure that the tools.jar is now in the JVM's classpath.