Wednesday, January 17, 2007

Creating a hybrid flex / java project in eclipse

One of the problem with FlexBuilder, which is integrated in the eclipse IDE, is that you will need a Flex Project in your workspace to make use of all the cool FlexBuilder tools.
You can't just integrate flex in your existing java-app, because the FlexBuilder won't recognize the project as a Flex project.
I've looked into the differences of these projects and it really isn't that hard to create a flex project with java support.

Just create a Flex project and edit the .project file it generates with it. Add another build command like:
<buildcommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildcommand>

And add another nature so it lookse like:
<natures>
<nature>com.adobe.flexbuilder.project.flexnature</nature>
<nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>

written by Marcel Panse