Lets be clear about one thing: the Android platform is NOT Java. It is an entirely new platform which, at best, has a compatibility layer for Java code.
Android uses the Dalvik VM, which is a register-based VM whereas JVM is stack-based. Neither the specification nor the source code for Dalvik are available, but it is clear that the bytecodes are quite different from Java bytecodes. There is a translation tool from JVM bytecode (.class files) to Dalvik bytecode (.dex files) but it is a build-time tool only. JVM bytecodes are never loaded onto an Android device. However, the Java programming language is used by the SDK to develop Android applications. The build pipeline uses a standard Java compiler to produce .class files and then the Android "dx" tool to produce and package .dex files. In addition, a subset of the standard JRE libraries are available, in .dex form, on the runtime (I believe they have used the class library from Apache Harmony to achieve this while remaining Apache licensed). Therefore it is possible to compile "most" standard Java source code to run on Android. The same should be true of the other languages discussed on this list, except that JVM- specific optimizations will be useless. The reason for the custom VM is that Dalvik is optimized to allow multiple instances of the VM to run simultaneously even in little memory. Each Android application runs in a separate Linux process. It's my suspicion that Google are only temporarily leveraging the Java language in order to gain developer mindshare and make use of existing tools such as Eclipse JDT, and they may well be planning to launch an efficient Dalvik-specific language at some point in the future. Neil On 13 Nov 2007, at 11:38, David Welton wrote: > > So... it looks like a much more 'up to date' Java than a lot of j2me > stuff. On the other hand, they do some weird things with the > bytecodes. Have you guys tried to get your languages going on it yet? > > -- > David N. Welton > > http://www.welton.it/davidw/ > > http://www.dedasys.com/ > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en -~----------~----~----~----~------~----~------~--~---
