|
Authored by: Ian Al on Saturday, April 21 2012 @ 03:50 AM EDT |
You have to run Java byte code class files through the dx tool to convert them
to Dalvik byte code before they will run on Dalvik.
---
Regards
Ian Al
Software Patents: It's the disclosed functions in the patent, stupid![ Reply to This | Parent | # ]
|
|
Authored by: Anonymous on Saturday, April 21 2012 @ 12:31 PM EDT |
My understanding:
Java uses a stack-based VM structure. The Java bytecodes describe
"atomic" operations performed by that VM.
Dalvik uses a register-based VM. Whatever the set of dalcodes it uses, it has
to be different from the bytecodes of Java. Java has no name, number, concept
for a "register". Dalvik has no innate concept for a "stack
variable".
The dx compiler does more than one-to-many translation from bytecodes to
dalcodes. It expects some "idioms" that are byproducts of the way the
Sun Java compiler derives bytecodes from source text, and uses these idioms to
generate dalcodes.
I read that the output of non-Sun-Java-compilers is not adequate input to dx; I
don't know if that means it would produce suboptimal dalcodes or would choke.[ Reply to This | Parent | # ]
|
|
|
|
|