6 ms·
Perhaps I'm not being clear. Groovy and Rhino emit bytecode that translates to Java at compile-time. Their runtime code generation facilities crash on Dalvik be
by eropple 13y ago
Perhaps I'm not being clear. Groovy and Rhino emit bytecode that translates to Java at compile-time. Their runtime code generation facilities crash on Dalvik because Dalvik does not support runtime-generated, JVM-compatible code. Dalvik does not support legal J2SE operations because it doesn't support Java bytecode as per the JVM spec.
I am not saying that Dalvik is bad. I'm saying it isn't a JVM; I was using this as just one example of its not-JVMness.
- ixampl 13y agoWas just wondering... for Groovy couldn't they just bundle the tooling to turn the runtime-generated bytecode into Dalvik bytecode? If there were a reliable Dalvik bytecode to JVM bytecode translator I assume most of the issues (similarly occuring with libraries like Javassist etc.) associated with load time and manipilation and code generation could be resolved. Or are there other special limitations on classloading in Android?
- vorg 13y ago> for Groovy couldn't they just bundle the tooling to turn the runtime-generated bytecode into Dalvik bytecode? There's no "just" when it comes to the Codehaus implementation of the Groovy Language. According to the Codehaus Groovy project manager [1], "Groovy is not able to run properly on Google's Android mobile platform ... (It takes) 20 seconds to start up a simple Hello World". BTW, that webpage was seeking students to do work making Groovy run on Android, but Google didn't accept that project, or any projects related to Groovy [2], perhaps because no students were interested or maybe because of Codehaus's history of mishandling GSoC projects. The last Groovy project ever accepted was one in 2011 rewriting Groovy's antiquated parser in Antlr 3.0. The project failed and Google only paid out half the project money. [1] http://groovy.codehaus.org/GSoC+2013 http://groovy.codehaus.org/GSoC+2013 [2] http://www.google-melange.com/gsoc/projects/list/google/gsoc2013 http://www.google-melange.com/gsoc/projects/list/google/gsoc...