2 ms·
Slight tangent: why does Android use a VM, but not a standard JVM? As said in this article: [C/C++ is better than Java when] very small footprint is required (
by ZeroGravitas 17y ago
Slight tangent: why does Android use a VM, but not a standard JVM?
As said in this article: [C/C++ is better than Java when] very small footprint is required (these days that does not include most phones). You can get JVMs that run well in a few hundred KB.
The situations where a VM, but not a JVM are sensible seem to be totally squashed between C/C++ on one side and the JVM on the other.
There was some theory that it was to do with licencing (http://www.betaversion.org/~stefano/linotype/news/110/ http://www.betaversion.org/~stefano/linotype/news/110/) but the argument got a bit obscure for me. Something along the lines of Google couldn't officially call it Java because it wouldn't meet the licencing requirements of the test suite.
But not being able to call it "JavaTM" seems like a small price compared with having an incompatible VM.
- frig 17y agoThe technical arguments for Dalvik I remember are twofold: (a, minor) the dalvik vm is a closer fit to the underlying cpu (being a register-based vm iirc) which makes it simpler to implement and/or a little more performant (b, major) the dalvik vm (contra the jvm) is designed to more-easily support the "single vm instance with multiple logically independent apps running in it" model; this reduces the vm-induced memory overhead b/c the vm and any system-wide libraries are only loaded once. There's probably also some truth to the trademark argument.
- blub 17y agoThese days, that INCLUDES most phones. Even if Symbian C++ is painful to write (weird API, Qt will make it much better), most programs are written in C++ and not Java. Java is as slow as a dog on S60 phones. WinMo phones? It's not even available, but I've run .NET apps on a pocket PC with 500Mhz+ processor and ~128MB RAM and the GUI is sluggish. iPhone? Not available, but the memory constraints are drastic. See Noel Llopis's blog posts about this.
- ilyak 17y agoThere is J2ME for WinMo. I guess it runs pretty J2MEy.