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: , , , , , , , , , , , ,

3 Responses to “Mxmlc ANT compiler error: “Error: Java heap space””

  1. dezza Says:

    Just what I needed thanks!

  2. Anurag Says:

    After trying so many options I got your post and it helped me, thanks a lot for the post.

  3. flex_learner Says:

    Thanks man! This worked!

Leave a Reply