Basically, I'm working on a fancy Adobe AIR app right now. As part of that, we are implementing an automated build process using CruiseControl and such. I'm using ant, and the flexTasks provided by Adobe. All was going pretty well, until this happened:
[mxmlc] Loading configuration file C:\Program Files\Adobe\Flex3SDK\frameworks\air-config.xml
[mxmlc] Error: null
[mxmlc]
[mxmlc] java.lang.OutOfMemoryError
After a bit of googling, there was no obvious solution. I did see mentions of setting the ANT_OPTS environment variable. So this is what I did (I'm running Windows Server 2003 btw...):
- Hit Windows-Break to open the "System Properties" dialog.
- Go to the advanced tab.
- Click "environment variables"
- In the System variables section, click New.
- Enter the variable name as ANT_OPTS, and the value as -Xmx512m.
- Click "OK".
You can find a much nicer visualisation of that process here. If you are on a UNIX box, then you'll need to:
set ANT_OPTS=-Xmx512M; export ANT_OPTSfrom the shell.
If you want to know more, you should read about the Java virtual machine's memory tuning options. I couldn't find any documentation about the ANT_OPTS environment variable.
I also found that if your solution doesn't work, this should...
ReplyDeleteOutOfMemoryError during compilation
The Flexcover versions of mxmlc and compc are a little more memory-hungry than the originals. If your compile in Ant is failing in java with an OutOfMemoryError, try including the 'fork' and 'maxmemory' attribute in your mxmlc compilation task in your build.xml file, for example:
fork="true" maxmemory="512m"
http://code.google.com/p/flexcover/wiki/FlexcoverHints
ReplyDeleteexport ANT_OPS=-Xmx512M
ReplyDelete