Google's Android mobile software platform, as we know, has caused quite a conflict with Oracle, given Oracle's failed lawsuit that claimed Java-like Android infringed on Java patents and copyrights. But now, might Oracle and Google, or even just one of them, decide to formally develop an open source implementation of Java especially for Android?
Such an endeavour has been the subject of recent chatter on the OpenJDK online newsgroup. OpenJDK is the official, Oracle-sanctioned version of open source Java. Some observers say a version of OpenJDK for Android would bring Android development to the many millions of Java developers. Java applications could run on Android devices - so might such a project get under way? From the looks of it, the answer right now would have to be no.
Representatives for Oracle, which has eyed an appeal of the Android verdict, and Google declined to answer the question. Others in the Java space were not optimistic. "What OpenJDK for Android would provide would be a true Java environment for Android. For the majority of the world that understands how to develop using Java, that would be a great thing," said Scott Sellers, CEO of Java virtual machine vendor Azul Systems. "Whether or not I think it would happen, that is a different question entirely."
With Android, applications run on the Dalvik managed runtime. Android's environment is not compatible with Java even if it is similar, Sellers said, adding that Dalvik entails a learning curve. But he does not see Google being eager to move to OpenJDK. "Google doesn't have a vested interest in enabling a true Java environment for Android," he said. Sellers cites open source licensing differences as a part of the issue. OpenJDK leverages the GNU General Public License, in which any code changes or fixes must be contributed back to the community at large, a prospect not attractive to some commercial vendors, Sellers said. Dalvik abides by the Apache license, which does not have this problem, he notes.
Gosling - OpenJDK on Android could be done
The possibility of OpenJDK on Android doesn't have any technical obstacles, Java founder James Gosling says: "Technically, it's not a huge problem. Android is just Linux on ARM, and there's already a nice ARM/Linux version of OpenJDK. There are issues that would make the current binaries inappropriate (mostly graphics integration), but it's not insurmountable." Major benefits would be performance and compatibility, Gosling says.
But Gosling too sees business obstacles: "The hard issues are business. Google and Apple both want walled gardens, although Google is much less blatant than Apple."
One developer already has pursued the idea of accommodating Android on OpenJDK. "Some time ago, I started with some friends a project called IcedRobot, about porting the Android API on top of the standard OpenJDK," says Mario Torre, a senior software engineer at Red Hat, who stresses he is not speaking on behalf of the company. "The idea was that it would have been interesting to give Java developers the ability to use the Android framework.
"The obvious advantage is that you could keep running and supporting legacy applications, but at the same time benefit from new and more modern APIs, which are really widespread, well understood, and easy to use," Torre says. The project stalled, however. "The problem we had is that there is a very high entrance barrier, and since, at this early stage, the outcome for a possible adoption is still unclear, we didn't manage to attract a lot of developers." There was a lot of interest in the Daneel Dalvik-to-Java bytecode converter that was part of the project, he says.
While some observers see obvious benefits for OpenJDK on Android, a developer who's organised both Java and Android user groups sees the current setup, which leverages Dalvik, as superior. "It's way less memory-intensive than standard Java would be, including OpenJDK-based Java," says Aleksandar Gargenta, organiser of the San Francisco Android User Group and the San Francisco Java User Group. A technologist with open source technology trainer Marakana, Gargenta also favors Dalvik's security model, which allows applications to be sandboxed. "Dalvik is technically superior for the model that Android offers," says Gargenta.
As far as OpenJDK opening up Android to Java developers, Gargenta says they already have access: "Java developers already know the language necessary to develop for Android." Developers write in Java and the code is packaged for Android. Regardless, Gargenta does not see OpenJDK happening for Android.
Industry analysts in the software development space did not have much optimism to add to the debate.
"I think the Java on Android ship has sailed and survived a major 'engagement' with Oracle," says analyst John Rymer, of Forrester Research. "I suppose OpenJDK could seek to provide an alternative Java environment but I don't see it happening. First, why would developers care? Second, Oracle and IBM are uninterested in 'clients', as they monetise servers." Also, OpenJDK is late on its road map and mobile would be a distraction," Rymer argues. He also argues that Oracle bans the kind of innovating-on-core that produced Google Dalvik, so partners could not do the port independent of Oracle.
IDC analyst Al Hilwa says he is not sure Oracle wants anything to do with Android yet. He also cites potential open source licensing issues: "In theory, OpenJDK for Android is possible, but someone is going to have to write or port a lot of low-level code to access mobile specific capabilities related to smartphones. GPL licences often restrict vendors from monetising the code in certain ways without making it also open source, so that might be another factor."
Sellers, though, sees an opportunity for the community at large. "Maybe people in the community will take on their own initiative to do it." A handset manufacturer might even be up for the task, says Sellers.