views:

400

answers:

3

what's the shortest path to convert a java applet to flash / flex ? have you any experiences with something similar? please describe.

thanks guys

+1  A: 

I'm in the middle of a project like that right now. There doesn't really seem to be any quick way to do it.

We've basically just had to start from scratch and rewrite the whole applet. You can't use java code to build a SWF, and the languages are different enough that there isn't really a way to automate the conversion.

There are also a lot of differences in what's available. For instance, Flex is single-threaded, so if your java applet uses multiple threads you'd have to find a way around that.

Also, Flex can't open windows outside of the SWF itself, while Java applets can open windows and generally reach outside of the area of the browser window that it's living in.

I'd say the best thing would be to get yourself familiar with Flex, both the language and the UI toolkit that it includes. Once you're comfortable with the abilities of the language and the way the UI gets built you can start looking at how closely your java applet would fit.

If you're not using any features of Java that Flex doesn't match then you could just start porting each class from java to actionscript, which shouldn't be too difficult. If your applet does do things that SWFs can't then you'll need to put more thought in how to implement it in Flex, and your code probably won't match the java code very closely.

Herms
May I ask, what kind of project are you working on?
Bassel Alkhateeb
It's a web-conferencing product. A significant portion of the client is currently done as a java applet, and we're working on switching to a Flex-based SWF instead.
Herms
A: 

I am working on a project for which i require applets to display on mobile. what are the ways in which i can do this? I need to automate the conversion. Is this possible?

Manoj
A: 

Also take a look at Java FX, If your not bound to the flash/flex platform It could make porting the app alot easier as Java FX has support for calling Java Classes and Applets.

http://javafx.com/

Knife-Action-Jesus