java lang OutOfMemoryError PermGen space eclipse

java lang OutOfMemoryError PermGen space eclipse

Exception in thread “main” java.lang.OutOfMemoryError: PermGen space

  • This is one of big annoying error in eclipse when you run the application and personally I don’t like it. You get exception as below:

  • Solution: As see above we are getting this exception because it’s out of PermGen space particularly. You can increase PermGen space as below:

-XX:MaxPermSize=128M

To fix this error permanently please put below in your program VM argument:

-Xms512m -Xmx1024m -XX:MaxPermSize=128M

java lang OutOfMemoryError PermGen space eclipse

  • For more information to increase memory in eclipse please visit this link

Leave a Reply

Your email address will not be published. Required fields are marked *