In Tomcat6 you could create a TOMCAT_HOME/bin/setenv.sh (or, for Windows, setenv.bat) and assign your JAVA_OPTS values there. I recommend this because it keeps you from having to modify the Tomcat control scripts.
I haven't checked lately, but I am fairly sure that this can still be done in Tomcat 7.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Jun 05, 2009
Thanks for your reply, I can create sh or bat file inside the bin folder, fine. How to configure that bat or sh file will be get called when the server starts up?
If Tomcat is setup using a Windows Service, the .BAT/.CMD files will not be called. To setup the parameters in a Windows service just run the .EXE Tomcat7w.exe found in the /bin directory. You will see a panel that allows you to add -D properties (and adjust memory and other common settings).