I want to redistribute tomcat as part of my application. I'll be distributing a bundled jre as well, and I need to have my app's installer a) install the tomcat service in windows and b) not have it use JAVA_HOME if it's already set on the machine. That is, I need tomcat to point to my bundled jre.
I read here that you can pass a command line parameter to tomcat6w.exe to change the jre that tomcat uses. Will this change persist even after stopping the tomcat service?
I also noticed that the tomcat service manager program stores its settings in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun 2.0\Tomcat6\Parameters
. Is it enough to change the Java\Jvm key to the jvm.dll of my bundled jre?