How and where do I change the option for JVM heap memory in Tomcat?
Created May 4, 2012
Alessandro A. Garbagnati Nimmi,
If you look into the tomcat.sh or tomcat.bat under the bin directory of tomcat, you can see an environment variable called TOMCAT_OPTS.
If you look into the tomcat.sh or tomcat.bat under the bin directory of tomcat, you can see an environment variable called TOMCAT_OPTS.
You can use it for passing all the JVM specific parameters, like the -X or -D.
You can set it directly in the file, or set it in the environment before calling it. For example in unix you can do:
For Tomcat 4.x.x, the logic is the same, but the filenames and the variable name are different.
export TOMCAT_OPTS=" -Xms15M -Xmx15M"
tomcat.sh start
The environment variable is CATALINA_OPTS, and you can find references in catalina.sh or catalina.bat.