1 person found this helpful
Here are 2 good articles that can get you started on setup of a LCDS/Flex/WTP project and debugging. The first article is titled, "Creating a combined Flex/Java project in Flex Builder w/o LCDS/BlazeDS" by Mihai CORLAN. Do not be fooled by the title, it does show how to setup the project with BlazeDS or LCDS.
I have seen these links before, tried to followed the instructions from the first article but with no success (the problem about resource could not be found was reported by several other folks in the comments). Mihai seems to be responding so I might try again and ask about specific problems as I encounter them.
So, kasmit, is the combined project the recommended route? What if the server and client code are written by different teams? Wouldn't it be better to have the Java project separate? If so, are there any guidelines on how to actually setup Eclipse to support this? Anyone can share their experience?
Thank you very much,
1 person found this helpful
I think the simplest way to work with Flex, Java, and LCDS in Eclipse is by creating an Eclipse Java project and then adding a Flex Project to it. This will let you work in the single project and use the Flash perspective (Flash Builder) for your LCDS client code and the Java perspective for your Java code. I don't think you need to go the WTP route. You DO need to use the Flash Builder plug-in rather than Flash Builder stand-alone.
Here's the basic process:
1. Create a Java project in Eclipse.
2. In your Java project, you can optionally set the output location to be a linked directory in your LCDS web app. For example, maybe you want to save POJO classes in the WEB-INF/classes directory of your web application. This is an option when you configure the source and output directories for your project:
- Select the Allow Output Folders For Source Folders option when configuring your project.
- Select Browse next to the Default Output Folder field.
- Select the project directory name. Select Create New Folder.
- Select Advanced > Link To Folder In File System.
- Browse to the location where you want to save output and click OK.
Similarly, if you will be exporting your output to a JAR file, you can save the JAR file to the WEB-INF/lib directory of your LCDS web application.
3. In the Package Explorer, right click the name of your new Java project, and select Add/Change Project Type and then select Add Flex Project.
4. Set up your Flex J2EE/LCDS project just as you normally would.
Now when you toggle between the Java and Flash perspectives, you can work on your Java and Flex code in the same project. When you build your Java project, the output will go in whatever output directory you defined, such as lcds_root/tomcat/webapps/lcds-samples/WEB-INF/classes.
The Using LCDS doc describes how you can also link your config files into your Flex project to make it easy to define your destinations, etc. from Flash Builder. It is covered here:
Thanks for your response. I currently use a similar setup, just have the Java and Flex projects as two separate ones.
BTW, what you described would work in FB Standalone plus some plugins installed too.