I am currently investigating how to deploy Tomcat as a windows service with some configuration settings. Without using System Environment Variables, how can I specify the location of the JRE (I'm bundling it with my Tomcat distribution)? Also, how can I set the heap min and max sizes for Tomcat?
So far I've run the "service.bat" batch file with some added arguments like:
service.bat ServiceName //US//tomcat7 --JvmMs512–JvmMx1024
to attempt to set the heap sizes. This does not seem to be working.
EDIT: I've been using the following commands now that I understand them more:
tomcat7 //US//Test --JavaHome=PathToJRE --JvmMs=512 --JvmMx=1024
This still does not work. I'm verifying that it doesn't because I've uninstalled Java off of the host machine. Here is the location where I'm getting the information: http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html
It is my understanding that when deploying Tomcat as a service, "setenv.bat" and "setclasspath.bat" don't actually get executed. Please correct me if I am wrong, because that would be my easiest solution. Also what does get executed in terms of the batch files located inside tomcat/bin when you install Tomcat as a service using "service.bat" to do it?
-Thanks