when i first looked at the android documentation, i just wanted to find out what android was, in very technical terms. it looks a lot like many Java libraries, but in this case, it is a bit different. the whole story is available as Dalvik: how Google routed around Sun's IP-based licensing restrictions on Java ME
, but the important lesson is that android is probably the first large scale attempt to subvert the holy trinity of how Java was used so far. usually, Java is three things:
- a programming language: Java is an object-oriented programming language such as C++ that defines its own syntax and semantics of how Java programs have to written and how they work.
- a runtime environment: in addition to the basic programming language, Java usually comes with standard class libraries, and these are packaged in different editions, the most common being Java SE (J2SE), Java EE (J2EE), and Java ME (J2ME). the latter was the common Java runtime environment on mobile devices so far, and Sun collects licensing fees for every single phone which supports J2ME.
- a runtime platform: Java applications are typically compiled into Java bytecode, which is then run on a Java Virtual Machine (JVM). there is no reason why Java programs have to be compiled into Java bytecode, but this used to be the norm. not any more.
android uses apache harmony, an open source implementation of Java SE (this is the ominously named Core Libraries
block in the android architecture), and adds to that the mobile-oriented android library. all of that then compiles into Dalvik bytecode (not standard JVM bytecode) and executes on the Dalvik virtual machine. by doing this, Google avoided having to license anything from sun. citing from the above blog post:
The trick is that Google doesn't claim that Android is a Java platform, although it can run some programs written with the Java language and against some derived version of the Java class library. Sun could prevent this if they had a patent on the standard class library, but they don't and, even if they did, I strongly doubt it would be enforceable since Android doesn't claim to be compatible (and in fact, could very well claim that their subset/superset is an innovation on the existing patent and challenge Sun's position).
interesting. i currently have a hard time figuring out whether that's good or bad, and until i do so, i just enjoy thinking about the legions of lawyers at Google, scurrying around to figure out a way how to safely design and build and release a non-Java Java platform...
Comments