Adobe Flex Development On Ubuntu Linux

Adobe Flex is an API that works in tandem with Flash 9 player, is available as an SDK. There is a free version of the SDK that allows you to develop Flex applications. You can get the SDK from the download section and install it in your development directory. The SDK contain two sets of development tools that target two platforms: Linux and Windows. You can code and test in Windows or choose a flavor of Linux, remember to simply run the appropriate compiler to get the output file generated.

If you’re interested to know more about setting-up a Flex development environment in Linux, please read-on as I’ll document the steps needed to get you up-and-running.

From here on, you’ll be seeing concrete examples that might confuse you if you’re not familiar with what I’m describing. For example, Ubuntu will be used as a reference OS and that might confuse non-Ubuntu developers. If that’s the case, you can still follow-through and try to relate them to your familiar environment.

Let’s start with what tools are needed to setup the environment.

  1. Ubuntu 7
  2. Adobe Flex SDK (free version)
  3. Java JRE
  4. Firefox

We’re now ready to assemble the parts. Here we go.

Ubuntu

I chose Ubuntu as a reference for this article. The reason behind for choosing Ubuntu is a subjective one and I’m not going to go there explaining why. This is one of the benefits of having to participate in Freedom Culture.

I’ve set up the latest version known as Feisty Fawn and you can get a free copy from www.Ubuntu.com , download a copy and install, you should be OK to follow the next step.

Flex SDK

The free version of Flex SDKis available from Adobe Flex Download. Download the package and install it in your development directory.

  1. Click download to start download.
  2. Save package in ~/Packages.
  3. Expand downloaded package in ~/Packages/flex
  4. For every build.sh file add the following text shown in the code box.
  5. That’s it.

Setting the path to Java JRE instead of the default Java that came with Ubuntu.

#code box
export JAVA_HOME=~/Packages/jre
export PATH=$JAVA_HOME/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

If this approach doesn’t appeal to you, there is another method you can do and that is simply add the setting to ~/.bashrc instead.
Java JRE

Java developers may find this one optional as they already have Java JRE installed. In my case, I don’t code Java so I had to download the JRE from http://www.Sun.com, that’s definitely an extra step. One thing I found out when I was testing the sample files, the Java that came installed in Ubuntu didn’t work, that’s why you need to get a working version for Flex SDK.

  1. Download Java JRE from http://www.sun.com
  2. Install in ~/Packages/jre/

At this point, you can now compile the sample files located in ~/Packages/flex/samples/ directory. Simply navigate to the directory and run the shell script build.sh and you’ll see the output files with the extension .swf, you can drop the swf file onto a browser and it will render once it gets loaded.

Firefox

This is the last step to get you going. Flex is browser dependent and mostly all testing will be done using a browser. In Ubuntu’s case, the Firefox browser is already installed and accessible from the desktop toolbar.

Conclusion

At this point, your Flex development environment is already set up. And if you count how much they cost to get these tools installed you will be surprised they are free as in beer.

Thanks for reading if you’ve reach this far.

Addendum: by the way, check out the Flex SDK website for more information on developing applications using the Flex SDK

About these ads

6 Responses to Adobe Flex Development On Ubuntu Linux

  1. ssharma says:

    Hi,

    I am trying to compile an example mxml file from flex site with flex 2.0 sdk on ubuntu and it is crashing ? I am using java 1.5 jre from sun

  2. specs says:

    could also enable the multiverse repository and do

    sudo aptitude install sun-java6-jre sun-java6-plugin

  3. pan69 says:

    How about using Eclipse with flex2ant (www.flex2ant.org)?

  4. Will says:

    When I ran java -version after installing java/jre 6 through apt-get(after enabling the multiverse repos) it was reporting 1.4.2 and should have been reporting 1.6. To fix this I ran
    sudo update-alternatives –config java
    after all worked.
    Thanks for the tutorial, helped a lot!

  5. Thanx for nice informative article

    It is always good to get some fresh info, thoughts and considerations about flex technologies

    cheers!

  6. kurt says:

    there should definitely be some more info on how to install programs in general on linux. this article assumes too much. a simple link isn’t too much trouble :)

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

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: