BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Android will Use the OpenJDK

Android will Use the OpenJDK

Leia em Português

This item in japanese

Hacker News has reported on an Android source code commit that suggests that Google’s mobile operating system is switching the implementation of their Java libraries from the original Harmony-based one to OpenJDK. The move has been confirmed by Google to VentureBeat.

Android makes extensive use of the Java language and several libraries, the latter being based on the retired Apache Harmony project. Harmony was meant to be a free and open source implementation of the Java runtime and associated libraries and tools, but Sun decided to open source Java under a GNU GPL license as the OpenJDK project and which has later become the reference implementation for the Java Platform SE.

When Google started working on Android after buying the company with the same name in 2005, they decided to create an application framework and development tools based on Harmony. There was no OpenJDK at that time. Later, after buying Sun in 2010, Oracle sued Google for copyright and patent infringement related to using Java code in Android. Google initially won in court, the jury deciding that the Java API cannot be copyrighted, but the ruling was partially overturn by the Federal Circuit which decided that APIs can be copyrighted. The US Supreme Court did not want to see the case, sending it to a lower court. That process is still going on.

In the meantime, Google has decided to use the OpenJDK implementation for Android. After news of a related source code commit was spread on the web, Google confirmed the move to VentureBeat:

As an open-source platform, Android is built upon the collaboration of the open-source community. In our upcoming release of Android, we plan to move Android’s Java language libraries to an OpenJDK-based approach, creating a common code base for developers to build apps and services. Google has long worked with and contributed to the OpenJDK community, and we look forward to making even more contributions to the OpenJDK project in the future.

Regarding the reason, Google told VentureBeat that they were interested in using some of the latest language features existing in Java 8 such as lambdas and that it makes more sense to invest in OpenJDK. Google considers the move as beneficial for Android developers due to code simplification by having “a common codebase for these Java API libraries, as opposed to multiple codebases.”

Shai Almog, cofounder of Codename One, a cross-platform set of Java tools, commented on Google’s adoption of OpenJDK, concluding:

This is great news for all Java developers everywhere!
Whether you work on Android, server, mobile or desktop!
This could be the start of the long anticipated "peace process" or at least a ceasefire between Google & Oracle. This could allow us all to align behind one Java version eventually (taking into consideration the slow Android update process). It could help bring Java back into vogue with some developers who considered the closed nature of Java problematic.

It is not clear if Google and Oracle have reached an agreement to settle the ongoing legal dispute. It is probable though that Google’s participation in the OpenJDK project will be a boost to its further development and the overall Java ecosystem.

Rate this Article

Adoption
Style

BT