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.
UPDATE: This guide is now outdated! I recommend to head over to my newest guide of Setting up the Ultimate Flash Development Environment!
- 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.
- 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).
- 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).
- 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 …
- 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.
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
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:
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.
- 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.
- 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!