Flash Builder 4.5 [mxmlc] Error: Java heap space

Dead Ant, Dead Ant, Dead Ant…you get the picture. I use a separate run-time Ant script to compile my Flash Builder projects. Since, I’m a freelancing sun of a gun, I usually work onsite on different client machines through out the year, which means I’m constantly setting up a version of Flash Builder. One task I tend to overlook is to prevent the Java heap space Error by increasing the JVM (Java Virtual Machine) memory. If you also run an eclipse integrated Ant, and you build applications that become large with lots of objects, you may one day come across this error:

[mxmlc] Error: Java heap space

Don’t panic, here’s a simple solution for all you Mac users out there, sorry Window peeps.

In Flash Builder :

(2) Navigate to the JRE Tab.
(3) Enter ‘-Xmx640m’ in the VM arguments field ( without the quotes ).
(Xmx denotes maximum size of Heap in Java, 640 is the size and m is for mega)

Flash Builder 4.5 Screenshot

(4) Select APPLY, then RUN.

Also, here are some quick tips from Red Code Labs that help optimize Flash Builders performance.

Leave a Reply

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

%d bloggers like this: