How to make sure that Tomcat6 reads CATALINA_OPTS on Windows?

后端 未结 4 1251
被撕碎了的回忆
被撕碎了的回忆 2021-02-03 14:48

I have a Tomcat6 running on a Windows2003 machine. I deployed 2 Grails apps on this server and I soon noticed that everything was crashing sometime after the deploy with a class

4条回答
  •  眼角桃花
    2021-02-03 15:05

    Actual way to do it (in Catalina.bat),

    set "JAVA_OPTS=-Djava.awt.headless=true -server -Xms512m -Xmx2048m -XX:PermSize=512m -XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled"
    

    add this line in such a position so that this JAVA_OPTS is transferred to any of _EXECJAVA command at the end of file (if-else nested). I personally write this line as first statement of this batch

提交回复
热议问题