Flash Builder & Apparat example: BUILD FAILED “java.io.IOException: Cannot run program “…/mxmlc” (in directory “…/apparat-ant-example”): error=2, No such file or directory

Made sure my Flash Builder 4.5 on OSX 10.5 is set to use Java 1.6 (out of the box it came set to use JVM 1.5).

Followed the instructions on webdevotion.be and cultcreative.com.

When it came time to do “Run As > Ant Build” I kept getting this error:

Buildfile: /your_path_to_example_folder/apparat-ant-example/build/build.xml
clean:
compile:

BUILD FAILED
/your_path_to_example_folder/apparat-ant-example/build/build.xml:64:
Execute failed: java.io.IOException: Cannot run program "/Applications/Adobe%20Flash%20Builder%204.5/sdks/4.5.0/bin/mxmlc"
(in directory "/your_path_to_example_folder/apparat-ant-example"): error=2, No such file or directory

Total time: 860 milliseconds

After trying a bunch of things, it turned out it was a permissions problem.

To fix it, I swapped Flex SDK to one outside of /Applications/ folder. Inside the project’s build.properties I updated FLEX_HOME line to:

FLEX_HOME=/your_path_to_sdk/Flex_SDKs/4.1.0

instead of

FLEX_HOME=/Applications/Flash%20Builder%204.5/sdks/4.5.0

and it worked.

Advertisements

2 thoughts on “Flash Builder & Apparat example: BUILD FAILED “java.io.IOException: Cannot run program “…/mxmlc” (in directory “…/apparat-ant-example”): error=2, No such file or directory

  1. glad you were able to solve that.. always make sure that the values in the properties are pointing to existing paths on your system. that has caused me huge headaches in the past

    • Thanks Marc. In my case, it was pretty confusing – I could see the path to the SDK (the one throwing the error) by using Finder to navigate to it BUT if I tried to navigate to it via Terminal I got “no such file or directory”. This was on a company iMac with limited admin access.

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