Java / Flex / BlazeDS project? – Solving issues with Flash Builder 4 “Stand Alone”

Posted on March 25, 2011


By default the Flash Builder environment does not come with the tools you need when you want to do a Java / Apache / Flex / BlazeDS project.

I found out the hard way that – when you have no clue what you are doing and the Eclipse site had a download speed of 14 KB per secons (for real!) – trying to make it work in Flash Builder 4 can be a frustrating hell.

After several tries and a clean install, I simplified my approach and created the following install process to get Java / Apache running in Flash Builder.

If you have similar issues, drop a note

Am I the only one who had to deal with this issue? Are there other people using the “Flash Builder 4 Stand Alone” version?

Let me know. Add a remark at the end of this post.

If you had to deal with this issue as well, I hope this post helped you solve it or get away from it (by taking the fast and easy lane).

Why did I hang on?

“It worked on my other machine”. Plain and simple. I had Flex Builder 3 running: “from the box” and I could not give up on making it work. It also might have been the aftermath of the flu clouding my judgment. In the past 3 weeks I must have passed through every possible strain of the “common cold” and I am still at 80%.

The fast and easy lane – install the Eclipse plugin version

Install the Flash Builder 4 plugin in an existing Eclipse Java / JEE install. All you need for the Java / BlazeDS project is there.

It is a faster and simpler solution and saves you a lot of trouble.

How I resolved the last issue – “wrong Java Build Path”

I had an existing project which was setup on my Mac. Something in both the Eclipse / FB4 setup and the FB4 stand alone version did not like the settings with this specific project and gave me several Java related errors, including ones disallowing me to close Elcipse / Flash Builder 4 in a proper way. When trying to correct it in the FB4 stand alone version the IDE simply spasmed out.

The screenshot below is after repairs – via Eclipse with FB4 plugin.

JRE environment - unbound due to wrong config files, set to Flash Builder 4 to fix

I was unable to set the right path in the Flash Builder 4 Stand alone verison.

Only when I opened the same project in the Eclipse + FB4 plugin version I was able to fix this last issue. From that moment on the project runs in both Stand alone and Eclipse + FB4 plugin environments.

Steps in brief

  1. Clean FB 4 install – as I did a lot of failed tries, I decided to start afresh with a clean install of Flash Builder 4
  2. Add update locations – To avoid dependency issues when installing the Web Tools Platform, add 4 update locations to your “Available Software Sites” list
  3. Run the update – It will state that there is “nothing to update” but you will find a lot of new updatre locations in the Avialable Software list
  4. Enable the components in the list – Some of them you need. Some of them you do not. Who cares! Unless you are completely anal about it and like to spend a full day trying. I just wanted to make it work.
  5. Install the Web Tools Platform via the FB 4 Software Installer – It will give you all the things you missed, except for a list of server-types to use when you want to install your server
  6. Download and copy the Web Tools Platform Zip – Having fun yet? To be able to add a concrete server (Apache in my case) I found this short-cut around a world of pain
  7. Restart Flash Builder 4 – It should work now

The main issue: Flash builder 4 and the pain of unresolved dependencies

In brief: solving dependencies is no longer a button you can click as was the case in Flex Builder 3.

When the software you want to install has dependencies to other classes in other software packages, Eclipse will not install until you resolved the issue by installing the missing components. Flex Builder 3 (and Eclipse) offered you a button for that. Flash Builder 4 (based on Eclipse Galileo, which has the same issue) does not.

I tried a different approach than described above, doing it step by step according to this set of instructions on the Adobe Labs website.

It took me 2 days (also due to rediculously slow download speeds at the Eclipse site) of frustration and it did not work for me.

Secondary issue: JRE environment might be configured wrong when importing existing project

When all seemed to be running, the existing project gave me some extra issues.

Step 1 – Clean install

I installed Flash Builder 4 fresh from the Adobe download and inserted my licence key

When I open the “Other views” dialog after the clean install, this is the list.

List of views after fresh install - We want to see "Servers" in this list

The project, running Java and BlazeDS via Apache 6

The project I am working on runs Java and BlazeDS via Apache 6. So I want to be able to setup a Server in Flash Builder and run / debug the application within Eclipse.

Step 2: You want Java and Servers? – Sure! Adding update locations

To find the update-locations in FB 4, the shortest route I found was by selecting “Install new Software” via the help-menu.

The shortes route I found to find the disabled downloads

Click on “Available Software sites”. The list will be empty. Using the Eclipse Galileo install I did a while ago, I copied all the update-locations from that install.

These are the links you want to add:

  1. EPP Packages Repository
  2. Galileo
  3. The Eclipse Project Updates
  4. The Eclipse Web Tools Platform (WTP) Project update site

The wanted end-result for Flash Builder 4 should be something like this (from the Java install of Eclipse Galileo):

Eclipse Galileo - An impression of the wanted end-result

Step 3: Running the update – nothing to update?

In first instance, when you run the update via “Help” – Software updates..”, Flash Builder will poll the locaitons and say “Nothing to update”.

However, when you repeat the first part of step 2 you will find a new list of items in the “Available software sites” list, all set to “disabled”.

Step 4: Enabling the components you get from the four links – run update again

A view of the disabled items I enabled

I simply took no risks. These are the steps I took:

  1. I selected all components set to “disabled” and set them all to “enabled”.
  2. I ran the Update process again via: “Help” – Software updates..”.
  3. The update process will start.
  4. I waited for the update process to end (about 15 to 30 minutes)
  5. It will state “nothing to update”
  6. When you check the list of Available Software Sites again, more items have been added.

Step 5: Installing the Web Tools Platform

Although step 4 is like dropping an atom bomb on an ant-hill, it resolves many of the dependency issues you would otherwise encounter.

What you need now is the Web Tools Platform. It will offer you hooks for Apache and other Webservers to connect your project to.

You will need to install this via: “Help” – “Install Software”. This will take another 15 to 30 minutes.

Explicitly Installing the Web Tools Platform

Result – Java and “Server” are in the list of views

And presto! Java and “Server” have become available.

Presto! Java and "Server" avaialable as views in Flash Builder 4

Not there yet – installing Server support

When you add the “Server view” and open the “Add Server” dialog (right mouse click on empty panel) you will see an empty list of “supported servers”

Adding a server

Oops! Where are my servers?

You will need to add support for your webserver.

Step 6: Downloading and copying features / plugins from WTP into FB4

Yeah. By now you will understand how much fun this is, no?

  1. Go to the WTP download site and download
  2. Unzip the package
  3. Copy the folders “features” and “plugins” from the downloaded package to your Flash Builder 4 folder in “Program Files”

Copying the "Features" and "Plugins" folder into FB 4

Step 7: Restart Flash Builder 4

After restarting FB4, you will see a more complete list when adding a Server to the Server view.

Finally we can choose a Server to add

From that point on, adding a Server and choosing your server location is like how it works in Eclipse.


Creating a BlazeDS project with Java in Flex Builder 3 seemed much easier. I had to jump through a lot of hoops to find the most simple (not necessary the best mind you!) way to make it work.

It might be that this installation process introduces a lot of overhead in classes added to your Flash Builder 4 Eclipse install.

Easier is to just drop the Flash Builder 4 stand alone version and go for the Eclipse plugin. Make sure you download Eclipse for Java or JEE.

Posted in: Workarounds