Monday, December 24, 2012
Dalvik: Not Your Father's JVM
Waiting for the last download to finish seemed like a good time to peruse more overheads.
Overhead 39 is a nice diagram of how Java files turn into apps. My pal, Jim Flanagan, made a jar in a conventional Java environment and downloaded it to his girlfriend, Marcia's phone, but it wouldn't just run.
Well, yes.
The "getting it onto his girlfriend's phone" part would just require attaching it to an email, but this shows why getting it to run is another story.
Android uses Java, and heavily, but the Java Runtime Environment (JRE) doesn't look anything like Sun's. (Yeah, yeah "... Oracle's.") Android's Java virtual machine (JVM), Dalvik, runs "dex" files (Dalvik EXecutables?) instead of "jar" files.
Plus, of course, they need to be signed and aligned.
Once I have all this internalized, I'll be able to show Jim how to build a dexfile that will run on her phone. I'll drive off that bridge when I come to it.
Why "Dalvik"? According to Wikipedia, it's named after an Icelandic fishing village.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment