|
That's because, as they explicitly write: "Android follows the package and class namespace conventions defined by the Java programming language". And obviously, the names in the packages are carried over, including sun.*, and the documentation is gonna follow that -- though the official name of the runtime is Dalvik (and ART), not Java or JVM or anything like that. As I wrote, that was intentional, so that it's immediately familiar to Java programmers. That's just at the superficial API level though, which Oracle contested in court and I don't recall HNers being on their side... Nobody was ever meant to use it to replace Java in their Java deployments and enterprise apps, or to run Java apps as is on that environment. And Google never promoted it as such -- as a Java replacement. Only as a Java-like environment specifically for Android development, and tied to the specific needs of its OS and devices. What Android actually runs is a different language implementation through and through, with a different scope (target OS, environments, use etc) and a different VM, GC and tons of different APIs, with tons of not used APIs compared to the Java one's too (Swing for starters). And it's own bytecode of course. So why should it follow Oracle's Java versions and progress, when it's NOT meant as a Java replacement? It has its own roadmap. Heck, even the Java-like code behind the APIs, what's not 100% Googles, is not Oracle's or Sun's, but from the open source Apache Harmony project. |
And in fact Oracle's lawsuit is about neither the language or the runtime, it's about the APIs. Yes, they were taken from Apache Harmony. Oracle insists that Android's use of them infringes because Google created a derived work, incompatible with the full Java API, from the Harmony implementation of the Java API. Google, in fact, is replacing the Harmony code with OpenJDK[1], Oracle's official open-source implementation of the Java API. (Which is one of about a billion reasons why your claim that Android uses a language based on Java instead of actually using Java is so baffling -- it's so based on Java that they can replace their code with Oracle's official Java implementation!)
[1] http://arstechnica.com/tech-policy/2016/01/android-n-switche...