I am looking for a way to programmatically set Java Options for Tomcat 6.0 running as a Windows service. When using startup.bat
and shutdown.bat
, you can set these variables in a setenv.bat
or catalina.bat
file. However, for Tomcat running as a Windows Service, these options must be manually set in the Java Options section of the configuration utility.
Is there any way to programmatically set these options?
Background: I am trying to write an installer that will deploy my app to an existing Tomcat 6.0 server. I can do everything else programmatically, but I'll still have to ask the user to manually add a few Java Options in these settings. This is less than ideal, especially since these options are case- and whitespace-sensitive.