Friday, August 10, 2007

My first attempt to run Flex compiler on Ubuntu

Today I tried creating my first Flex application, so I downloaded Flex 2 SDK from Adobe website and extracted it on my just-installed Ubuntu. Then, I started to search a tutorial of Hello World program on the Internet and found one. After gradually following his steps, I got an error while the problem is being compiled by Flex compiler.

$
mxmlc first.mxml

Loading configuration file /usr/local/flex2/frameworks/flex-config.xml
Segmentation fault (core dumped)
$

I had no idea why mxmlc crashed whenever I tried to compile a mxml file. Finally, I found an article stating about this problem in LaunchPad. As a result, I did what he said immediately and it's perfect. There is no problem anymore.

According to the article, the problem is that Ubuntu’s default JRE doesn’t like Flex SDK. Thus, I need to download a new JDK from Sun or others. The instructions below is the steps to install JDK. Please be noticed on step 4, since it's very important. In my case, even though I chose to follow the option 1, I still need to do step 4 of the option 2.


How to Install JDK (Refer to Space Program Blog)
    1. Option 1:
      1. run: sudo apt-get install sun-java5-jdk
    2. Option 2: (if option 1 doesn't work)
      1. download jdk 1.5 from sun, the Self extracting linux version, .bin extension (NOT rpm)
      2. run: sudo apt-get java-package
      3. run: fakeroot jdk***.bin
      4. run: sudo update-alternatives --config java
        - select the j2sdk1.5-sun option
      5. run: java -version
        - just to make sure it's the new version

Labels: , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home