« Return to Thread: Anyone got the groovy running on Android?

Re: Anyone got the groovy running on Android?

by tugwilson :: Rate this Message:

Reply to Author | View in Thread


Tahir Akhtar wrote:
Hi,
I found this through google.
http://www.jameswilliams.be/blog/entry/38;jsessionid=7711F31E5A4CE248E63009221DFE6117

Someone got a better solution?
As i understand it, the Android JVM does not use the normal JVM bytecodes. There is a preprocessor which converts class files produced by the Java compiler into the format used by Android (the Android bytecodes use a register rather than a stack architecture).

I do not believe that the preprocessor runs on Android.

I think that this makes the use of custom ClassLoaders and dynamic compilation using ASM impossible at the moment on Android.

It might be possible to run a subset of Groovy on Android if you pre compiled the Groovy code and ran the class files thorough the converter. However the runtime system does tend to like to dynamically compile helper classes and this might need some hacking to get it to work properly.

I believe JRuby is able to directly execute the AST for a class rather than having to compile it to bytecodes first. It may be that it would be easier to get JRuby to run on Android than Groovy at the moment (Scala has been reported as running OK)

John Wilson

 « Return to Thread: Anyone got the groovy running on Android?