How can I configure apache tomcat to use a different java home when installed as a windows service?
I want to redistribute tomcat as part of my application. I will also be distributing the bundled jre and I need to install the application installer a) install the tomcat service on Windows and b) not use JAVA_HOME if it is already installed on the machine. That is, I need tomcat to point to my associated jre.
I read here so you can pass the tomcat6w.exe command line parameter to change the jre that tomcat uses. Will this change persist even after stopping tomcat service?
I also noticed that the tomcat service manager program saves 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 associated jre?
source to share