Home > Dev > Setting up Eclipse for Flash Developers

Setting up Eclipse for Flash Developers

I’ve been using Eclipse and FDT for several years now to develop Flash (and Flex) applications but I never really managed to set up Eclipse to exactly fit my needs. Either some desired tools were missing or I installed plug-ins that slowed down Eclipse with a truck load of stuff that I never need.

So today I finally figured out how to install the plug-ins that I really need and nothing else (well … almost nothing else). The following guide describes how you can set up your own custom Eclipse tailored for Flash/Flex development which features FDT plus Subclipse, a HTML, CSS, JavaScript and XML Editor and then some. The CSS Editor becomes especially useful for Flex Stylesheets.


UPDATE: This guide is now outdated! I recommend to head over to my newest guide of Setting up the Ultimate Flash Development Environment!


  1. First I recommend to wipe your standard Sun Java runtime and install JRockit instead. JRockit is a highly optimized Java runtime from Oracle which is free and can be downloaded here. I recommend getting the ‘Real-Time’ version (you have to register at their site to be able to download but I’d say it’s worth it).
    You might also want to add a system variable under Windows named JAVA_HOME that points to the JRockit runtime path if you want the Flex SDK compiler to make use of JRockit.
  2. Go to eclipse.org and download the “Eclipse IDE for Java Developers” (~85MB). Currently the latest version of Eclipse Ganymede is v3.4.2. The reason I choose the Java Dev distribution is because it is not as loaded as the Classic version or some other versions (we don’t need Plug-In development do we?!) but it contains some niceties which can be very useful for us, notably Mylyn, a decent XML editor and a cool Snippets plug-in which can be useful even though we already get the Templates feature with FDT.
    Note for Vista users: If you’re under Windows Vista and use UAC like me, I recommend not to put the Eclipse folder into your Program Files. If you do this Eclipse will split up your installation and put all your additional plug-ins into a sub folder in your user folder. And so far I’ve always ran into troubles with this when updating Plug-ins at a later time. Instead I’ve created a folder named ‘Applications’ in my user folder into which I install all applications that have trouble with Vista’s UAC, and so Eclipse is placed there as well (e.g. C:UsersusernameApplicationsEclipse).
  3. Next edit your eclipse.ini to something like the following:
    -vm "C:Program Files (x86)/Java/jrrt/jre/bin/javaw.exe"
    -showsplash
    -framework
    pluginsorg.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
    -vmargs
    -Xms768M
    -Xmx768M
    -XX:PermSize=256M
    -XX:MaxPermSize=512M
    -XX:+UseParallelGC

    … of course you need to correct the path to the JRockit runtime and you might need to change Xms/Xmx as your system fits, however a minimum of 512MB is recommended for use with FDT. (While you’re at it, you might wanna replace the splash.bmp file in Eclipse/plugins/ org.eclipse.platform_x.x.xxx.vxxxxxxxxxxxx which this one).

  4. Install Subclipse by adding the Subclipse update URL from the Subclipse website to your Eclipse Help/Software Updates dialog. I recommend the 1.4.x release as in the 1.6.x release SVNKit seems not to be supported at the time of this writing. Be sure to install …
    • Subclipse
    • Client Adapter
    • Native Library Adapter
    • JNA Library
    • SVNKit Client Adapter
    • SVNKit Library

    … and – if you want – Subclipse Integration for Mylyn and Subversion Revision Graph. Restart Eclipse after install.

  5. Next up is Aptana, or at least the parts that we want from it. By default Aptana comes with a freight full of web dev stuff that we as Flash deveopers probably wont ever need. However I find it useful to have a decent HTML, CSS and Javascript editor at hand.
    Grab the Aptana update URL from their site (probably http://update.aptana.com/update/studio/3.4 ) and proceed the same way as with Subclipse. Aptana will first install a bootstrap installer after which Eclipse is restarted and then starts with the real installation. At that point you are able to choose which components of Aptana you want to install. I choose the following …

    • Aptana Editor Infrastructure
    • HTML Editor
    • CSS Editor
    • Javascript Editor

    Let it download and install those parts. After install and Eclipse restart for some strange reason Aptana will continue to nag us with the install dialog to install other parts of the Aptana package (probably the Aptana Web Development Tools). But we don’t want all that baggage, right?! To get rid of the install nag, press cancel, quit Eclipse and then do the following …

    • navigate to Eclipse/features and delete or move the
      com.aptana.ide.feature.eclipseXX. aptana.bootstrap _X.X.X.XXXXX-XXXXXXXX folder.
    • navigate to Eclipse/plugins and delete or move the files:
      com.aptana.ide.eclipseXX.aptana.bootstrap_X.X.X.XXXXX.jar
      com.aptana.ide.server.portal_X.X.X.XXXXXX.jar
      org.mortbay.jetty_X.X.XX.vXXXXXXXXXXXX.jar

    Removing the first three parts kills the install nag. The last file is not really necessary to delete but doing so prevents a feature of Aptana that establishes a HTML preview server even though we only want to build Flash projects.

  6. At last we install our main tool, FDT. Get the update URL from the FDT website, add it to your Eclipse Software Updates dialog as usual and proceed to install. I choose the latest beta which is at http://fdt.powerflasher.com/update_beta/. Installing FDT might take a while as the package is quite large, including a shipped version of the Flex SDK.
  7. Finished! Enjoy your light-weight (in Eclipse terms) setup and start coding your soul out! I hope this guide was useful for anyone to get their Eclipse install right! However I’m by no means an Eclipse expert so if you got any hints or improvement notes to make the install even better let us know!
Categories: Dev Tags: , , , , , , ,
  1. volkan
    April 12th, 2009 at 06:36 | #1

    FDT seems like a lot of money. Is there a cheaper alternative? Flex toolkit?

  2. April 12th, 2009 at 11:10 | #2

    Yeah FDT isn’t exactly cheap. There is the new FDT Pure version though which might be more afordable. I’m afraid other than that there is no good solution to develop Flash/Flex on Eclipse, except for Flex Builder but in terms of ActionScript coding “FB cannot deliver the water to FDT”! ;)

  3. Zimmen
    April 12th, 2009 at 18:32 | #3

    Nice, now lets see what i can take to osx from this description…

    FDT could be swapped for Flexbuilder but then … well you still have flex builder!

    Is the Eclipse Java package necessary or can we start with the Eclipse Platform Binary as well (sort of a bare bones eclipse, no workspace profile included!) http://download.eclipse.org/eclipse/downloads/drops/R-3.4.2-200902111700/index.php

  4. April 12th, 2009 at 18:59 | #4

    Zimmen, I’ve never tried the bare bones package but I suppose it might work as well. Not sure if Ant is included though in case you need it. I choose the Java Dev package because of the above mentioned utilities and because I sometimes dig through Java source code for reference.

  5. April 21st, 2009 at 19:22 | #5

    Hi,

    This is a handy posted. I’ve started setting up using your instructions, but I got stuck on the first step :) I’ve used PC for ages, but at work I use a mac. I know it’s a pretty straight forward process on a pc( uninstalling JRE ), but since mac comes with it preinstalled, and I’m not that confortable with macs, I’m afraid not to mess anything else. Any tips ?

  6. zimmen
    April 21st, 2009 at 20:58 | #6

    I used this guide as a base to get things going on a mac. It’s not compatible but i did help. I ended up with the latest Eclipse for Java developers + Flexbuilder Plugin + PDT (for php development) + CFEclipse (for the snip Tree) + Lee Brimelow’s plugin for launching the Flash IDE + modified spashscreen and icon. Now there is only the HTML / Javascript side of things to do and i don’t know wetter Aptana is the way to go performance wise ….

  7. April 21st, 2009 at 21:20 | #7

    @zimmen I’ve got Flex Builder, and just added Subclipse. I won’t be needing CFEclips, PDT and Lee Brimlow’s stuff…Speaking of which…I just use call a jsfl file (I’m pointing to from flex instead of opening the html file )…and compile in flash when I have flash/as3 projects. That JRockit thing sounds great and I want to give it a try. That’s why I was asking about safely uninstalling JRE on a mac.

  8. April 21st, 2009 at 21:48 | #8

    @George I’m afraid I can’t help there, sorry. I only got marginal knowledge about how things run on OSX. I’m using my MacBook only for testing (*blaasphemy* … I know I know ;)

    @zimmen If you install the whole Aptana then yes, I would say it’s a resource-hogging bugger with all the cloud server stuff etc. but hence my guide to only install the single editors.

  9. zimmen
    April 21st, 2009 at 23:01 | #9

    @George Yeah, there is no way you can replace the apple-supplied JRE on the mac, there is no other distro than this one as far as i know (no JRockit). You can try using the Java SE 1.6 64-bit version (Applications/Utilities/Java/Java preferences.app). Lee brimelow’s plugin does just that, call an jsfl file

    @sascha i’ll give the single editors a try … do they support jQuery syntax stuff?

  10. April 21st, 2009 at 23:18 | #10

    So you’re saying it’s not possible to install another JRE on Mac? That would be rather limiting! I know on Windows you can have several different JRE’s installed side by side.

    There’s a JQuery PlugIn that is installed with Aptana but only if you choose to install the Web Development Tools. And if you choose that you get quite a lot of other stuff, if you want it or not.
    Maybe you can make a temp Eclipse install, throw all the Aptana stuff in it, grab the Aptana JQuery jar from the PlugIns folder, copy it to your real Eclipse folder and see if that works with the HTML/JS editors.

  11. zimmen
    April 22nd, 2009 at 21:46 | #11

    There is now way to install another JRE on the mac as far as i know. There was a brief 1.6 version on Tiger but they pulled that because it was to buggy. Now we’re left with JDK SE 1.5.

    On windows you can have as many as you want, true.

    Perhaps i’ll download Aptana as “local install” package and rip the JQuery plugin from there. Is there no other comparable Eclipse Plugin to Aptana?

  12. April 23rd, 2009 at 00:35 | #12

    No jrockit :(
    I’ve installed Subclipse and it’s amazing…just to easy.
    Got Aptana html/css/js editors as well. Didn’t manage to get Mylyn though, got some errors. I’ve added these plugins straight into Flex Builders Standalone. There might be some things missing from eclipse. Got xml support though from Aptana I guess. I’ve noticed something about Bugzilla in the Mylyn features. Anyone doing any bugtracking in their actionscript projects ? Since I’m setting up properly this time, it might be worth it. Any hints ?

  13. April 23rd, 2009 at 01:14 | #13

    @zimmen there are plenty of html/js/css editors out there in the wild but all i’ve tested were either poor, lacking features or were bloody buggy. the aptana editors are quite good, decent syntax coloring and auto-complete and even support mark occurrences.

    @george well for now i only use mylyn to keep track of tasks since fdt has no integration with mylyn (as of yet). but even just for task management it’s already very helpful.

  14. April 24th, 2009 at 12:21 | #14

    This sounds perfect, but I’m wondering–can I edit a single AS3 class file without making a workspace or project or whatever for it? That’s the problem I have with Flex Builder and Eclipse — I need a good editor for simply writing AS3 then launching the Flash IDE…

  15. April 24th, 2009 at 12:42 | #15

    Corey, everything in Eclipse works inside projects. You could open a single class file but as long as it’s not in a project you don’t have much of what Eclipse/FDT offers. I know this is a drawback, sometimes you simple just want to sketch out quick ideas without creating an extra project for it.
    I basically solved this by creating a project in Eclipse that I named ‘lab’ in that all such quick sketches, tests, demo classes etc. go. It’s my scrapyard for AS3 classes so to say.

  16. April 24th, 2009 at 13:37 | #16

    I feel retarded for not thinking of that myself =P Thanks!

  17. May 11th, 2009 at 08:24 | #17

    Thanks for this FDT/Eclipse setup.

    What do you use for PHP dev? Is Aptana good or do you prefer Eclipse PDT? I have only used Eclipse’s PDT and it’s ok.

    Suggestions?

  18. May 12th, 2009 at 12:04 | #18

    Alan, to be honest I haven’t tried any of them yet as I don’t have much to do with PHP so far. Might be changing in the future though. If I had to develop PHP I would probably go with the full Aptana suite since it’s all well integrated for web development.

  19. May 24th, 2009 at 01:19 | #19

    Hey, thanks for the tips!

    I’ve got an Eclipse setup that I’m pretty comfortable with for most things, but am just starting out with Flash/AS3 development and am looking for a good solution for that.

    I’ve got a question about FDT: how do you set up your projects and so on in it? I know people who use it seem to really like it but as far as I can see it’s completely broken, I find I need to go out to a terminal window and run command line tools from there every few minutes!

  20. May 24th, 2009 at 03:45 | #20

    @ Ian Using FDT is pretty much the same as using Flash Builder, but with more options. Likewise, if you use Eclipse, then you should already be familiar with launching and debugging.

    There’s also no need to use any command line tools. Use ANT to invoke Flex Compiler tasks instead.

    Right Click Flash Explorer>New>New Flash Project.

    Create a Class to launch from. Then create a launch configuration.

    Launch the program.

  21. May 24th, 2009 at 04:23 | #21

    Hi Alan, thanks for the response.

    How do I set up dependencies between projects? If, say, I’ve got 3 or 4 projects with components in and another project that will contain my SWF and/or AIR targets, how do I set up the deps between them?

    I’ve kinda-sorta got it working, but it seems really hacky, here’s what I did:

    1. set up project references as normal in eclipse;

    2. realise that PDT doesn’t support them (WTF???);

    3. add a linked resource for each SWC project, pointing at it’s compiled SWC;

    4. add this as a linked SWC in the main project.

    This kind of makes it work, but I can’t use class navigation (F3), dependencies aren’t honoured (e.g. editing a SWC project means I have to manually rebuild any projects that depend on it). Also, FDT has problems resolving imports that use wild-cards.

    I’m guessing that there is a “right” way to set this up, and that this isn’t it, but the docs are almost non-existent and PowerFlasher don’t seem to offer any support unless you shell over wodges of cash (i.e. buy the Enterprise version).

  22. May 24th, 2009 at 04:25 | #22

    Lest all this come across as being totally whiney, I should add that the little bits of FDT that do seem to be working are pretty neat, I think that if they (PowerFlasher) spend some money on a good tech writer then they’d have a very good product here.

  23. May 24th, 2009 at 04:53 | #23

    @ Ian ya know…hmmm your questions are good. FDT is an excellent editor and your right, there is scarce info for those not used to either FB or Eclipse.

    The way I would incorporate code across different projects is to use
    ‘Linked Libraries’. I do this I have a code base I want to use from project to project, but don’t want to have to duplicate the files into every project.

    Right click on a project > Properties ( near the bottom ) > FDT Build Path > Under Source header (should be already selected as its the first option )> Add Linked Libraries…>Add..>New> Give your *reference* a name>Click ‘File’ for a SWC or ‘Folder’ for a source folder.

    At this point you will have created a reference to a folder on your hard drive and it will show up in your Project Explorer. You will know it is a Linked Library b/c the icon will have a little arrow on it.

    Also for other questions you may have, I have a nifty 34 tips every FDT user should know on my blog.

  24. May 24th, 2009 at 09:17 | #24

    Wow, Alan, thanks! That’s exactly what I needed to know. Hmm, having to add the linked projects under the source tab instead of the libraries tab isn’t the most intuitive thing in the world – it’s different from just about every other Eclipse *DT out there, but hey, it’s working much better now.

    “34 tips … on my blog” – subscribed.

    Again, thanks!

  25. June 3rd, 2009 at 20:33 | #25

    Thanks for this tutorial.I had some issues in installing it but I managed to resolve them when I read Alan comments.

  26. Patrick
    June 5th, 2009 at 03:08 | #26

    Awesome breakdown. I am learning java with the intention of migrating into flash and flex as well as the usual web tools (php, sql, etc.) Amibitious, I know, but I started in java as there’s a lot more help online for understanding coding concepts via java. I figure it’ll be easier to migrate from java than to it, and so far that’s working.

    I found this thread while hunting for information on Eclipse and Aptana. Looks like I can mash up most the tools I want.

    Here’s my question: It seems Flex builder sucks in comparison to using FDT. I just want a confirmation of this before I start into this install sequence. Also, the version of Eclipse I have is the Flex Builder one from Adobe…can this be used with all these other tools, or should I install the Eclipse version you recommend and uninstall the Flex Builder version. Can I leave both on, or will they clash. I might benefit from seeing the code Flex Builder generates when I use their gui layout tool, but I could always run that on a different machine if the two version clash.

    Thanks in advance…

  27. June 5th, 2009 at 04:19 | #27

    The standalone of Flex Builder is a stripped down version of Eclipse ( I believe they took out JDT). As such, it is missing many, many features.

    FDT is for ‘serious’ Flash developers, as such it is pricey. Flash Builder has one or two features over FDT, but those are more for doing Flex work. I guess, it’s kinda a hard question to answer to give. Because I think you need to decide how much time you will be spending working with Flash, and then also determine if you want to use the Flex framework or not.

    They both have 30 day trails so try them out.

  28. Patrick
    June 5th, 2009 at 07:21 | #28

    Right on…thanks for the answer. If anyone on here knows any of the specific reasons I should be considering Flex in addition to Flash, I’d be pretty curious. I can’t really tell what Flex has over Flash, as Flash can be busted down into AIR, it seems, as well. I wonder what Flex Builder adds to the mix that’s not in FDT.

  29. June 5th, 2009 at 07:30 | #29

    Flex and Flash are both ‘Flash’. Flex is a ton of prebuilt Flash components that one uses to make RIAs.

    Flex = heavy, prebuilt components geared for RIAs and Data services.
    Flash = [very] limited prebuilt components. Good when not doing RIAs and Data services.

  30. Patrick
    June 5th, 2009 at 07:38 | #30

    That’s what it sounded like. I’m relieved to know Flex isn’t any earth shattering progression over Flash. I’ll just build my environment according to this thread and take it from there. I can always run Flex on another machine and port the code over, or even install it alongside the version of Eclipse you suggest. Looking forward to getting into the swing of the IDE, as I’ve been forcing myself to work from the commandline for a touch of the old Karate Kid approach. Wax on. Wax off.

  31. June 5th, 2009 at 11:25 | #31

    Patrick, you can install both Flex Builder and Eclipse, they won’t clash. You could also d/l the Plug-In version of Flex Builder and add that to your existing Eclipse install, although I prefer the standalone next to my Eclipse because I rarely use Flexbuilder anymore and I think the FB plugin makes Eclipse quite heavy and slow (but that might be just me).

    Flex builders advantage is the visual design editor with that you can lay out components very comfortably. However you could also write Flex apps in 100% ActionScript as long as you use the Flex compiler. In fact Flex is just components that are written in AS.

    And AIR is another option. You can write bare Flash AIR apps, but you can also use Flex for AIR applications.

    Flex is good if you wanna write RIAs or applications in AIR that profit from a sort of standardized graphical user interface.

    I personally use Flex Builder only to prototype my Flex GUIs and then I go over to FDT and code all in ActionScript. That’s because I don’t like MXML. I dislike the way how you have to mix up MXML with ActionScript. Some die-hard Flexers may yell “blasphemy” but this way it gives me a lot more control over the code.

  32. June 9th, 2009 at 00:24 | #32

    Just wanted to point out – on step 3 – you have a mistake in direction.

    Top line of that config for eclipse.ini, you say do this:

    -vm “C:Program Files (x86)/Java/jrrt/jre/bin/javaw.exe”

    When actually, that did not work for me until i changed it to this:

    -vm
    C:Program Files (x86)/Java/jrrt/jre/bin/javaw.exe

    …maybe because im an eclipse noob, but figured it would help somebody

  33. July 28th, 2009 at 10:27 | #33

    Aptana just released Studio 1.5, and the plug-in site has changed to: http://update.aptana.com/update/studio. You can also access plug-in information on our wiki at: http://www.aptana.com/docs/index.php/Plugging_Aptana_into_an_existing_Eclipse_configuration. Thank you!

  34. san
    May 1st, 2010 at 20:31 | #34

    after experimenting with a lot of different settings, this is what worked best for me personally:

    -nosplash
    -vm “C:\Program Files\JRockit Real Time\jrrt-4.0.0-1.6.0\bin\javaw.exe”
    -nl
    en_US
    -vmargs
    -Xms1280m
    -Xmx1280m
    -XX:MaxPermSize=400m
    -XX:PermSize=312m
    -Djava.net.preferIPv4Stack=true
    -XX:+AggressiveHeap
    -XX:+AggressiveOpts
    -XX:+UseParallelOldGC
    -XX:ParallelGCThreads=3
    -XX:ThreadPriorityPolicy=1
    -Xverify:none
    -XX:MinHeapFreeRatio=20

  35. marcel_B
    September 17th, 2010 at 05:21 | #35

    adobe sucks and should be very ashamed of themselves. the flash ide is indeed too bad to be true. why can’t they make a proper ide with decent auto completion and auto import. it’s really sad.
    if you want to develop some flash apps and you don’t want to spend money, you’re stranded. you got no options.
    following the above steps isn’t very easy to. too much effort and too much money.
    adobe is just as bad as microsoft. they only want money. i’ve had it with flash.

  1. No trackbacks yet.
You must be logged in to post a comment.