Friday, June 17, 2011

How to fix the permGen memory error in Intellij 10.5

If you were like me, you were working on a large web-based java project and had intellij configured to start jetty for you.

All was well until you tried to start jetty using the Intellij Run or Debug functionality and it errors out every time due to a permgen memory error.

Google showed quickly that the problem was a memory configuration of the JVM, but how to change that configuration was not quickly apparent to me.

So this is how you do it.

  • Find the JVM memory values you want to change from the stackoverflow.com link above.  I used -XX:MaxPermSize=256M which worked in my case, YMMV.
  • Enter that configuration into the Run/Debug Configurations page in the VM parameters field.
VoilĂ !

1 comments:

Bradley said...

Thanks for the tip. :) It worked great.