On Mon, Jan 27, 2014 at 10:58 AM, Арсений Зинченко <setev...@gmail.com>wrote:
> > Set JAVA_OPTS as system variable (for all other applications); and create > setenv.bat in /bin/ directory with CATALINA_OPTS whith Xmx/Xms for Tomcat? > > Will it be more correctly than set CATALINA_OPTS as System variable? Or - > by the way, in setevn.bat must be used JAVA_OPTS too? > Others already pointed out, here are few more details: - use bin/setenv.bat(.sh) for customizing tomcat options (CATALINA_OPTS preferably, since JAVA_OPTS will be used for both startup and shutdown of tomcat, CATALINA_OPTS is used only for startup of tomcat) - setting up JAVA_OPTS as a system-wide setting will apply to ALL Java programs running on that box, and you would only want to set things in JAVA_OPTS for settings that you truly want to be set for EVERY Java program (e.g. -Djava.net.preferIPv4Stack=true) - the best would be that each Java application manages its own Xmx and Xms settings from their startup scripts (those other Java apps you were referring to) - so you are not forcing down someone's throat what JAVA_OPTS they would use ... Good luck! n.