Ubuntu’s default JRE doesn’t like Flex SDK
I downloaded the latest SDK of Flex to try out coding Flex in Ubuntu (6.06).
Here are the basic steps to try it out:
Download Flex 2 SDK for linux
Extract package to a directory (/home/renaun/Desktop/flexsdk/)
Create simple mxml file called helloworld.mxml
Run the following command:
>/home/renaun/Desktop/flexsdk/bin/mxmlc -o helloworld.swf helloworld.mxml
At this point I got a segmentation fault. Looking at the java version that comes with Ubuntu you see its a gij 1.4.2 JRE.
>java -version
java version “1.4.2″
gij (GNU libgcj) version 4.1.0 (Ubuntu 4.1.0-1ubuntu8)
To fix the segmentation fault I had to download a different JRE from Sun. I downloaded both the 1.5.0_10 and 1.4.2_13 self-extracting JREs. I extracted both in the Desktop folder. To change which java executable the mxmlc will run you need to modify the mxmlc shell script it self. On my install it was located at “/home/renaun/Desktop/flexsdk/bin/mxmlc”.
I edited the last line in the mxmlc shell script from:
java $VMARGS -jar “$FLEX_HOME/lib/mxmlc.jar” +flexlib=”$FLEX_HOME/frameworks” $*
to
/home/renaun/Desktop/jre1.5.0_10/bin/java $VMARGS -jar “$FLEX_HOME/lib/mxmlc.jar” +flexlib=”$FLEX_HOME/frameworks” $*
And that fixed the problem (both 1.5.0_10 and 1.4.2_13 work). Now onto some ant build scripts and eclipse integration….
Pingback: Wheeler Street » Blog Archive » Collecting Flex 2 on Linux Information