Avoid Permgen Space error when running Tomcat from Eclipse
21,223
Solution 1
The configuration in eclipse.ini
is only for the JVM that actually runs Eclipse.
Tomcat is run in its own JVM instance, so you'll need that separately.
Assuming you use WTP to start your Tomcat instance, you need to go to your Server configuration, click "Open launch configuration" and there (on the "Arguments" tab) edit/add the VM arguments to include the desired -XX:MaxPermSize
argument.
Solution 2
No. Tomcat runs in a separate JVM from eclipse. Add this option in the VM arguments of the launch configuration :
- double-click on the Tomcat server in the Servers view
- click on the link "Open launch configuration"
- switch to the Arguments tab
- add -XX:MaxPermSize=512m in the VM arguments text area
Author by
fresh_dev
Updated on January 03, 2020Comments
-
fresh_dev over 4 years
What is the best way to avoid permgen space error when running Tomcat from Eclipse 3.6? Is this done by adding the following line:
-XX:MaxPermSize=512m
at the end of
eclipse.ini
? Or is there extra configuration necessary? -
fresh_dev over 12 yearsadding the argument to the end of the variables, right:
-Dcatalina.base="C:\Workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0" -Dcatalina.home="D:\apache-tomcat-7.0.22" -Dwtp.deploy="C:\Workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps" -Djava.endorsed.dirs="D:\apache-tomcat-7.0.22\endorsed" -XX:MaxPermSize=512m