MyEclipse launched Tomcat, reported Outofmemoryerror:permgen space solution
posted on July 27, 2012
This is a very simple question, but the search for a half-day, found that we write a blog is too not serious, many people are not rigorous, will mislead everyone. Here's your own summary:
1. If you are starting Tomcat error individually, you can modify the Catalina.bat file as follows (assuming it is in Windows):
After the line "Rem-–execute the requested Command —————————————", "Echo Using catalina_base:"%catalina_base% "" is added before:
| 1 |
set JAVA_OPTS=%JAVA_OPTS% -server -XX:PermSize=512m -XX:MaxPermSize=512m |
Looking at a lot of blogs, someone has added a quotation mark to the front, someone who doesn't distinguish between a. bat file or a. sh file. Someone has added-xx:maxnewsize=512m, someone written in lowercase m and uppercase M mixed. Although it is convenient for me to write a blog, it is a great problem for the people who use it.
2. If it is in myeclipse, it can be shown in the interface:
In the optional Java VM arguments, fill in the following:
| 1 |
-Xms512m -Xmx512m -XX:PermSize=512m -XX:MaxPermSize=512m |
As for-xx:maxnewsize=512m there is no use, the size of M there is no difference, sorry, I do not have time to carefully scrutinize, just want to say, I hope you write a blog when the heart point, professional.
Workaround for Outofmemoryerror:permgen space