Just discovered this gem here: http://www.betaversion.org/~stefano/linotype/news/110/
- Android apps are developed in Java
- Android itself is licensed in APL, but Sun's source is licensed in GPL.
- Furthermore, Java is not open-sourced in mobile environments.
- How did Google do it?
Turns out that Android
- Uses Java as a development language but does not use Java bytecode or Java virtual machine for deployment.
- Has a virtual machine called Dalvik which does not claim to be a JVM
- First uses a regular java compiler to generate regular java bytecode (say, javac or the built-in Eclipse compiler) and then converts that bytecode into Dalvik's bytecode (the "dx" tool does this: converts .class/.jar into .dex files)
- Supports only a subset of Java SE (AWT/Swing and JavaME classes are omitted) classlib. Instead of using Sun's implementation, it uses Apache Harmony's implementation.
That's quite a tour de force.