OutOfMemory error:PermGen Space with Eclipse/Flex Builder Plugin/Ant
Posted by Dennis on Feb 3, 2009 in Flex • 4 commentsThis gave me a headache! This error occurred when I was trying to compile 38 separate ActionScript classes into SWF files:
OutOfMemory error:PermGen Space
If you search for this error you’ll find many blogposts written by utterly frustrated Java developers. It appears to be a dreaded error that is raised when deploying war files to web or application servers.
Fortunately, this article pointed me to the right solution for this problem: http://soenkerohde.com/2008/06/change-eclipse-ant-settings-when-you-run-out-of-memory/
But when I use this bit from the article:
-Xms768m -Xmx1024m -XX:MaxPermSize=512m
I get a “could not create virtual machine” error. However, when I change it to this:
-Xms768m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=256m
… it works fine




[...] OutOfMemory error:PermGen Space with Eclipse/Flex Builder Plugin … [...]
Buy the man a beer, I gave up on my ant exploration last week after trying unteen different ways to get rid of memory errors. This has fixed it for me! I’m off to jump around in the snow
thxs paddy
“utterly frustrated Java developers” nice one lol ,
sounds more like “frustrated eclipse users” (and i’d even push it to flex builder users) to me
I found that do this can significantly reduce compile time as well. Good job all round.