I'm working on some Flex spike in my company. We are basically evaluating different scenarios etc. What solution would you recommend for embedding Flex components into Java app? Flex <-> Java communication is not (yet...) an issue, just embedding swf into JFrame.
I've done it with EasyJCom. It's pretty straight forward as long as you're using one of the standard Java windowing libraries (Swing, awt). You can see an example (From the EZJCom site) here: http://www.ezjcom.com/FlashTest.java.txt
The people responsible for EasyJCom are also very responsive, and even though we ended up not using their product (Switching platforms), I'd recommend them.
I haven't used JFlashPlayer, but did take a look at the docs, it seems to be adequate as well. I think their license requires you to obfuscate your code. I thought it was a little odd, but maybe I mis-understood the license.
It gets quite a bit more complicated if you don't want to use Com, or if you need to embed in another type of window.
If you need to embed flash cross platform, you may be stuck rolling your own Jini library for the Mozilla plugin. At that point... Maybe it's worth just switching platforms if you aren't too far in. ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With