• 11gen
    Categories: Programming Commenti disabilitati

    I recently bought an Android phone and now I wish to develop some mobile apps. This is why I took a look at Flex technology and discovered with disappoint that Adobe is 1) selling their IDE at a very high cost 2) not supporting Linux anymore.

    In any case, being FlashBuilder based on Eclipse Platform, it's possible to run its plugins on a clean eclipse installation. The only unavoidable limitation is the usage of Adobe AIR 2.6, the last release for Linux systems.

    Merging the Flex SDK with Adobe AIR

    Although any Flex SDK can be used in FlashBuilder-Eclipse, it's recommended to use version 4.5.1 that at the time of writing is the only one that features the Design Mode (EDIT: it seems there is no way to make Design Mode functional. The closest environment is this web tool: http://designview.sourceforge.net/). Flex SDK can be obtained at http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK, while Adobe AIR 2.6 for Linux should remain available at the following link: http://airdownload.adobe.com/air/lin/download/2.6/AdobeAIRSDK.tbz2. It's afterward necessary to copy AIR runtimes/ to SDK runtimes/ and substitute SDK bin/adl with AIR bin/adl [1]

    Install FlashBuilder over Eclipse

    First, download a new Eclipse and install it somewhere, for instance in /usr/share/flashbuilder and optionally rename the eclipse executable to flashbuilder. Then, follow instructions at http://code.google.com/p/fb4linux/wiki/HowToInstall to install the port of the Adobe Flash Builder 4.5 to Linux. Actually to me it was impossible to use the Eclipse p2 updater and I simply dragged the features/ and plugins/ directories from the downloaded archive over the Eclipse folder. From now on, it will be possible to update the IDE (including module updates from Adobe) using the p2 updater.


    A few problems arose at this time; this is an alpha software in any case.

    1) Resolve PermGen space errors during execution and updates

    FlashBuilder requires much more memory than eclipse, run it with command line parameters -vmargs -Xms768m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m to be sure it doesn't run out of memory. Those parameters could also be set directly in the eclipse.ini file [2]

    2) Sporadic crashes (for instance when choosing an external web browser):

    Investigating the crash dump revealed the xulrunner library was the cause of this issue. Further googling helped to find the solution [3]: add the -Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/xulrunner-2/libxul.so parameter, to the command line execution, too.

    Eye candy

    To complete the integration with the desktop environment (Gnome Shell) I performed the steps that follows. Attached to this post, a zip file containing a Flash Builder icon and a splash screen: flashbuilder-eyecandy.zip

    1) Make flashbuilder a permanent entry to the dock

    Create a new file /usr/share/applications/flashbuilder.desktop with the following content, so that when FlashBuilder-Eclipse is run for the first time it will be possible to add it as favorite:

    [Desktop Entry]
    Name=Flash Builder
    GenericName=Adobe Flash Builder
    Comment=Eclipse IDE modified in order to use Adobe Flash Builder plugins
    Exec=/usr/share/flashbuilder/flashbuilder -vmargs -Xms768m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m -Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/xulrunner-2/libxul.so

    Note that the definition searches for a flashbuilder.* icon in the /usr/share/icons/ folder.

    2) Change FlashBuilder-Eclipse splash screen

    Follows the steps reported here [4] to change the Eclipse default splash screen


    [1] http://zoltanb.co.uk/how-to-set-up-flex-4-5-sdk-with-air-2-6-on-linux-using-fdt/

    [2] http://www.javaquery.com/2010/11/how-to-solve-permgen-space-error-in.html

    [3] http://kishalmi.net/cms/node/55

    [4] http://www.mkyong.com/java/how-to-change-eclipse-splash-welcome-screen-image/

    Tags: , ,

Comments are closed.