tomcat JVM parameters to configure three cases

Original Source: https: //blog.csdn.net/rainyspring4540/article/details/53305302

 

In fact, many Internet-related articles, here is the study looked at service.bat when tomcat from the start, I feel jvm parameters in the configuration file can be rewritten this, but time reasons, untested, timid do not enter

First listed under the Internet:

Environment: Tomcat8.0, jdk8

The first is the command line to start tomcat,

Linux environment, as follows

To add catalina.sh under bin tomcat's, the # OS specific support. $ Var _must_ be set to either true or false. After, before the cygwin = false position, in fact, the beginning of the shell code, add the parameter

 

 
 

 

JAVA_OPTS="-Xms512m -Xmx512m -XX:ParallelGCThreads=8 -XX:PermSize=128m -XX:MaxPermSize=256m"  

 

 

And then run to start startup.sh

 

windows environment, zip format, to unzip Tomcat, to load the configuration can start tomcat by startup.bat

To add the bin tomcat's catalina.bat, after the code below
rem Guess CATALINA_HOME if not defined
added JVM parameter set CURRENT_DIR =% cd% later

 

 
set JAVA_OPTS=-Xms512m -Xmx512m -XX:ParallelGCThreads=8 -XX:PermSize=128m -XX:MaxPermSize=256m  

 

FIG positions:

 

And then run to start startup.bat

Here mention that know understanding batch, just before the line as shown on the location, this is an example of the Internet, I usually placed at the beginning

 

The second case, by service.bat way to start,

Such as eclipse plug-in starts tomcat, load JVM: In the "window" menu - add the following to the JVM arguments "JVM Settings" "Preferences" - - "Tomcat":

 

-Xms1024M -Xmx2048M -XX:PermSize=256M -XX:MaxPermSize=512M 

 

 

Power from the start while the windows Tomcat (i.e., using the installed version installed Tomcat Tomcat exe format; or service.bat install Tomcat Version inflicted will extract the boot from the start), loading method:

 Open the Registry Editor, navigate to:

win7 32-bit systems are as follows:

HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun 2.0\tomcat8\Parameters\Java

Win7 X64 system is located

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0\tomcat8\Parameters\Java

Add or Edit Options key on the right, the additional parameters can JVM: follows:

 

 

These are the online solutions, feel reliable, single unverified, after leaving confirmed. . .

 

And finally to the place I have to say,

For the last windows using service.bat way, I studied service.bat install Tomcat command, first execute service.bat file, which is a batch logic, not go into details, I cut down intall command key code is as follows:

Red box is the area began to execute commands with various parameters of the Tomcat,

The red line is the line that there did not feel familiar, note the semicolon segmentation parameters, although I have not tested, but I think here you can configure JVM parameters, so you do not modify the registry, leaving after testing

Guess you like

Origin www.cnblogs.com/albert1314/p/11352767.html