How to increase Java heap space for a tomcat app

前端 未结 10 2397
攒了一身酷
攒了一身酷 2020-12-08 09:59

There are lots of questions that ask this or a similar question.

They all give the command that has to be executed, what I don\'t understand is where do I write this

10条回答
  •  Happy的楠姐
    2020-12-08 10:47

    There is a mechanism to do it without modifying any files that are in the distribution. You can create a separate file %CATALINA_HOME%\bin\setenv.bat or $CATALINA_HOME/bin/setenv.sh and put your environment variables there. Further, the memory settings apply to the JVM, not Tomcat, so I'd set the JAVA_OPTS variable instead:

    set JAVA_OPTS=-Xmx512m

提交回复
热议问题