Mxmlc ANT compiler error: “Error: Java heap space”
A simple error that causes a lot of headache that has a simple solution that is hard to find on the internet.
Don’t you just love these problems?
If you are calling mxmlc via ANT you’ve probably seen this error and had to resort to solutions like setting the ANT_OPTS or Java arguments for the SDK on every single computer that uses that build script.
The solution is actually much simpler than that, mxmlc allows you to set this in the ANT target itself. Just add the parameters fork=”true” to make it run on it’s own Java thread, and then set maxmemory to something like “1024m”.
It would have been nice if adobe had this in the documentation, but no such luck.
Tags: ant, ANT_OPTS, AS3, build, compiler, error, Flash, fork, java, java heap space, jvm, maxmemory, mxmlc
October 28th, 2011 at 06:05
Just what I needed thanks!
September 12th, 2014 at 16:55
After trying so many options I got your post and it helped me, thanks a lot for the post.
December 24th, 2014 at 13:47
Thanks man! This worked!