More like this

Software

Arrow

Developer

Was Android moving to OpenJDK really a Google gift to devs?

Semi-seasonal stocking filler was caught up in Oracle's Android fight

Surprise image via Shutterstock

Comment While you were starting to think Christmas thoughts in November, Google quietly slipped out a pre-seasonal gift of its own: OpenJDK for Android N – the next edition of its smartphone operating system.

Christmas is a time of surprises and Google's quiet move lived up to that spirit, because it was a profound change to its precious Android: libraries built using OpenJDK, the open-source version of the Oracle-owned Java Development Kit (JDK).

Until now, Android used libraries based on Harmony, the JDK stewarded by the Apache Software Foundation (ASF) that once rivaled OpenJDK.

OpenJDK had once been the anaemic cousin to Harmony, a project that had enjoyed the full-blooded backing from IBM. That was right up until database giant Oracle bought Java owner Sun Microsystems.

Not long afterwards, IBM ditched Harmony and got behind OpenJDK – with Apple signing up, too, for good measure. IBM had backed Harmony as part of its political battle over the control of Java. No Sun, no need for Harmony. Oracle promised a fresh start so IBM got aboard OpenJDK. Apache eventually shut down development of Harmony.

How does this all relate to Android N?

Oracle has been at Google’s throat for six years now over Android, claiming in court that the internet's biggest ad-flinger had deliberately and blatantly copied up to seven thousand lines of Java code and 37 Java API packages to build its hugely successful Android. Oracle didn't buy the Google defence of Harmony, that it was a clean implementation of JavaSE and went hunting for proof of hidden collusion between Apache and Google.

Google also sought to defend itself by arguing that Android used an independent virtual machine – a VM not owned by Oracle. Google countered that Android used Java APIs in its own virtual machine – not a VM owned by Oracle.

In return, Oracle had wanted $6m.

Six years on, and with victory and losses for both sides, the Oracle’s case has been stripped down by the presiding US judge to those 37 Java APIs.

Finally, things are coming down to brass tacks. Which brings us back to Android N.

Google is reported to have wasted no time in informing the judge hearing Oracle's case of Android N's embrace of OpenJDK.

Google's switch has been furiously debated and swiftly interpreted here and here as Google and Oracle settling in some way. Rather like God, it seems, there is a willful belief online that US court settlements move in mysterious ways

OpenJDK might potentially help limit any damages Google pays should it lose to Oracle by somehow convincing both the court and Oracle of Google's good intentions and willingness to play right. It might also shield Android N and future versions of Android from Oracle legals.

But OpenJDK doesn't tie things up for this case.

Oracle's case is based on past violations and changes to current behaviour won't undo that. More importantly, what Google has done is swap out the old Harmony libraries for the OpenJDK libraries; Android continues to use the actual Java language APIs that Oracle claims Google had also copied.

So, what other reasons might lie behind such the OpenJDK switcheroo? There is one: technical.

Harmony was all but done when IBM withdrew for the OpenJDJ and ASF retired the project in November 2011. That left Google and Android on a Harmony island while the industry swung behind OpenJDK. By joining OpenJDK, Google can take advantage of latest features in Java rather than maintaining its own particular implementation. It's now plugged into the same Java roadmap as everybody else.

Sponsored: IBM FlashSystem V9000 product guide