Step-1
Download Apache Tomcat.
Step-2
Go to Apache Tomcat /bin
directory.
Step-3
By default you wont see setenv.sh (for [Linux/Mac](https://crunchify.com/category/mac/))
or setenv.bat (for windows)
file under /bin
directory. You have to create one with below parameters.
export CATALINA_OPTS="$CATALINA_OPTS -Xms512m"
export CATALINA_OPTS="$CATALINA_OPTS -Xmx8192m"
export CATALINA_OPTS="$CATALINA_OPTS -XX:MaxPermSize=256m"
Step-4
- Go to command prompt.
- Go to
<Tomcat Directory>/bin
directory - Execute command:
./catalina.sh run
Step-5
Monitor logfile and you should see your Tomcat started with all your specified parameters in setenv.sh
file.
Command for Windows Environment:
You need to create setenv.bat
file with below content:
set "JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx8192m-XX:MaxPermSize=256m -server"
and run Tomcat with catalina.bat
引用:https://crunchify.com/how-to-change-jvm-heap-setting-xms-xmx-of-tomcat/
网友评论