Eclipse 中修改tomcat设置内存大小

    xiaoxiao2021-12-14  29

    主要针对OutOfMemoryError: PermGen space报错

    转载自 https://my.oschina.net/youyoubohexiang/blog/294023?p=1

    摘要: 我在tomcat的配置文件中修改了内存,本来将项目放到tomcat的webapps中,直接启动tomcat没有问题。但是在eclipse中创建service,tomcat还是原来修改过内存的那一个,但是还是报错了。在eclipse上又重新修改内存后一切才又正常。

    Eclipse 中修改tomcat设置内存大小

    修改1:

    在Eclipse中下面Servers双击Tomcat Server... 然后点击General InformAtion 下的Open launch configuration;

    会弹出Edit Configuration,然后在选中Arguments选项卡;在VM arguments文本框中最后面添加

    -Xms256m -Xmx1024m -XX:MaxPermSize=256m (时间可以自己设定)。

    修改2:

    在Eclipse菜单栏中Window ——》Preferences ——》Server ———》 Runtime Environment;

    选择您用的Tomcat 然后点击Edit...弹出Edit Server Runtime Ecvironment 下面JRE选项后面的Installed JREs...

    点击弹出Installed JREs;在选中您用的Jre在点击Edit..在Defaul VM Arguments:中填入-Xms256m -Xmx512m

    时间可以自己设定。

    最好两个地方都修改,希望能够帮助到您。

    转载请注明原文地址: https://ju.6miu.com/read-962892.html

    最新回复(0)