Posts Tagged ‘mxmlc’

Posted by admin at 13 January 2009

Category: linux

Tags: , ,

When invoking the Flex MXML Compiler (mxmlc) via the terminal you may come across this lovely error:

~$ mxmlc -output outputFile.swf workspace/project/inputFile.mxml
GC Warning: Out of Memory! Returning NIL!
Segmentation fault

Apparently, mxmlc does not like Ubuntu’s default JRE. To resolve this, download the latest Sun JDK and update the default JRE on your machine. Note, if you do not have the Sun JDK installed:

~$ sudo apt-get install sun-java6-jdk

Once the Sun JDK is installed, update the JRE:

~$ sudo update-alternatives –config java

Typical output would look like this:

There are 4 alternatives which provide `java’.
Selection Alternative
________________________________________
1 /usr/lib/jvm/java-6-sun/jre/bin/java
2 /usr/bin/gij-4.3
3 /usr/lib/jvm/java-gcj/jre/bin/java
4 /usr/bin/gij-4.2
Press enter to keep the default[*], or type selection number: 1

Choose 1, and try invoking mxmlc again. Everything should be dandy.

For a different way to resolve this, see: this post.