Hopefully someone can give me some pointers.
I'm working on a Java project which requires creating SWFs on the fly.
My first approach was to install Flex SDK and from my Java App call exec commands to run the Flex SDK Command Line executables. This approach seems a little hacky and there it means all users that run the Java Project must install the Flex SDK.
Ideally I'm after the following solution:
1 - Build my Java Project with the Flex SDK jar files included in the build path, into a single jar.
2 - Using the Flex SDK .jar API, invoke mxmlc or fcsh to compile SWF's. Hopefully the Flex .jars will provide compile time info
3 - Provide config info directly to the Flex jars.
This should allow me to distribute my Java App without the need for users to install Flex SDK. It also means the final solution will be more tightly intregrated with Flex and less hacky.
My questions are:
1 - Is this possible and are there are examples?
2 - Is it legal to package and distribute Flex jars in this way?
3 - If there are no examples of how to do this, am I best of taking the Flex SDK source files, making my updates and compiling this into my project?
4 - Are there any reasons why it won't be possible, such as Flex jars relies on code outside of Java or expects things in certain places?
If none of the above is possible or legal; are any of the following alternatives possible?
1 - Package the Flex SDK with my application installer. As part of the install, Flex SDK will be installed, and my application will use the Flex SDK command line compiler.
2 - My users must download and install Flex SDK before using my application.
I may actually be approaching this the wrong way, any suggestions would be greatly appreciated.
Finally are there any javadocs for the Flex jars, or tutorials on how to use these jars inside a Java Project?
Thanks for reading and any feedback.