title: Way to programmatically set Java options for Tomcat as a Windows Service
body: <p>I am looking for a way to programmatically set Java Options for Tomcat 6.0 <strong>running as a Windows service.</strong>  When using <code>startup.bat</code> and <code>shutdown.bat</code>, you can set these variables in a <code>setenv.bat</code> or <code>catalina.bat</code> file. However, for Tomcat running as a Windows Service, these options must be manually set in the Java Options section of the configuration utility.</p>
  
  <p>Is there any way to programmatically set these options?</p>
  
  <p>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.</p>