views:

306

answers:

3

There are many dynamic languages that target Sun's JVM (Groovy, Scala, Jython, Jruby etc) and I was sure there are many that target Adobe's AVM as well. But I was surprised to find only haXe do something similiar. related question on this site

I think the eclipse e4 SWT project doesn't compile to ABC (ActionScript Byte Code) directly, but first converts Java to AS3 and then the Flex compilter does the rest.

Could it be that no one yet wrote a simple Java / Python / Scala AVM2 compiler that can be used as an alternative to the proprietary Adobe Flash Builder (formerly Flex Builder)?

I don't mind paying Adobe for a fine producy, but writing Java in eclipse is so much faster and convinent than the half baked adobe plugin suite. are there really no efforts other than haXe?

A: 

I found out that adobe started to do something similar (but for C++): http://labs.adobe.com/technologies/alchemy/

Also this one (C# compiler) but it seems to be obsolete: http://blog.bluetubeinteractive.com/2005/05/c%5Fto%5Fswf%5Fcompil.html

And there is an apparently abandoned Java Implementation: http://osflash.org/j2as

But I'm still looking for a working Java to AVM2 implementation... Anyone? :)

Ehrann Mehdan
+1  A: 

Here you go: Compiling Java and C# to SWF

James Ward
I guess this is as close as it gets :)Thanks for the answer. If I may ask, I plowed Google warp and weft and didn't find the above link. Can you kindly share here how did you came across it?
Ehrann Mehdan
I subscribe to the Flex category on feeds.adobe.com and see Joa's posts there.
James Ward
+1  A: 

I don't mind paying Adobe for a fine producy, but writing Java in eclipse is so much faster and convinent than the half baked adobe plugin suite.

mxmlc (the Flex compiler) is free and open source and available as part of the Flex SDK. It compiles actionscript 3 to swf. If you want an IDE with the same level of support as writing Java in Eclipse then you will want FDT which unfortunately isn't free but is far superior to Adobe's Flex/Flash Builder. You could also use Flash Develop which is a very capable and free IDE for flash development.

AS3 is a nice language in it's own right and can compare favorably to Java (although some newer Java features like generics are sadly missing). So learning it wouldn't be "re-inventing the wheel" so much as adding another bow to your development skills quiver.

But if you are insistent on wanting to write Java code and produce swf files then I think that Joa's work that James linked to above is your best bet. I'm not sure if he has released all the parts publicly yet though...

vitch
I was an ActionScripter myself once, even before I've learned JavaThe thing is once I got used to eclipse, its hard to go back.Thanks for the reply!
Ehrann Mehdan
FDT is eclipse. And like I say, it's nearly as good as JDT (autocomplete, quick fixes, refactoring, templates etc etc). But it's not free (or even cheap!). If you are using it professionally then it will pay for itself in saved time pretty quickly though. And they give free licenses to people who release open source projects...
vitch