Recently developed using Eclipse, the server used was Tomcat, but in the start times the caused By:java.lang.OutOfMemoryError:PermGen space exception.
This error is very common, so configure Tomcat under the Catalina.bat, configuration Eclipse.ini, various methods have been used, not work! It took a long time, in the near collapse of the time to find the following solution, finally solved.
In order not to Detour, I write three methods, I use the third method to solve.
The first method: Modify the Catalina.bat in the Tomcat/bin directory.
Join under "REM-----Execute The requested Command----------------------"
java_opts= "-server-xms800m-xmx800m-xxnewsize=256m-xx:permsize=256m-xx:maxnewsize=512m-xx:maxpermsize=512m" .
This approach works when you use Tomcat only, but it doesn't work when you use Eclipse.
The second method: Modify the Eclipse.ini.
Join
-vm
D:/jdk6/bin/javaw.exe
-vmargs
-dosgi.requiredjavaversion=1.5
-xms512m
-xmx1024m
-xx:permsize=256m
-xx:maxpermsize=512m
This method sometimes works, but this time it does not work, the specific reasons I do not know, I guess it may be written above this paragraph with the launch of the Tomcat server in eclipse does not matter, so can not solve the problem of Tomcat error.
Third method: Modify Eclipse's Run configurations.
- Click "Run"-"Run Configurations" and click "Arguments" tab in the open window.
-xms256m-xmx512m-xx:maxnewsize=256m-xx:maxpermsize=256m
How to solve the Eclipse report PermGen space exception problem