Directly compile actionscript from your java application - makes sense since I believe the flex compiler is encapsulated in a jar.