“Java Space Error” Fix for Flex Developers

I thought I had to write this, at least for my benefit, but for others as well, who are trying to scour the internet to find the solution to this. The problem is, when using ANT and MXMLC, to compile your Flex projects, you get a “java heap space” error, similar to:


[mxmlc] Error: Java heap space 
[mxmlc] java.lang.OutOfMemoryError: Java heap space

 Everyone on the internet is talking about fixing it via changing Eclipse settings (well I don’t use Eclipse) or via export console settings, like java …. but the simplest way I found, was to add the following (see red) in your ant build.xml file.

<mxmlc file=”${src.dir}/${input.file}”
output=”${build.dir}/${automation.file}”
actionscript-file-encoding=”UTF-8″
keep-generated-actionscript=”false”
keep-all-type-selectors=”true”
fork=”true” maxmemory=”512m>
Advertisements
This entry was posted in Adobe Technologies, General and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s