Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News A Discussion with Josh Bloch on the Future of Java

A Discussion with Josh Bloch on the Future of Java

This item in japanese

Josh Bloch - a prominent contributor (you might know some of his work if you've ever used the Java Collections framework) to the Java platform at Sun for many years, currently a Googler, author of the award winning books "Effective Java" and "Effective Java Second Edition" - gave a talk at the recent web-based Red Hat Middleware 2020 conference. The thrust of the talk was guarded optimism and concern about the future of the Java platform under Oracle's stewardship. InfoQ contacted Josh to see if he would be interested in expanding upon these ideas. The discussion - particularly apropos of the increasing exodus of Sun talent from Oracle and concerns over Oracle's handling of the community and the Java Intellectual Property looming - is reaching a fever-pitch of late because it intersects many different, going concerns. We were glad to be able to talk to Mr. Bloch about some of these.

InfoQ : What is your main concern?

I don't have a single main concern. Several factors that have combined in the past few years to take the wind out of Java's sails.

InfoQ: Why do you feel the march of evolution for Java has slowed?

  1. The Sun / Apache stalemate TCK licensing stalemate has all but eliminated progress via the JCP.
  2. Sun's lack of support, leadership, and clarity has kept Java 7 from making perceptible progress. I'm not sure people are aware how few resources Sun allocated to Java SE in the past few years. But the consequences have been quite visible: every year JavaOne rolls around, and Java 7 seems no closer. And there has been an awful lot of infighting among Java's supporters. In earlier days, Sun played the role of benevolent dictator, which helped to limit the infighting.
  3. The use of GPLv2 for OpenJDK hinders adoption even by those who are less concerned with TCK issues. The "copyleft" provisions scare away many potential corporate adopters. As a result, resources are being split between Harmony and OpenJDK. Also the multiplicity of license used by the various JCP members for various components of various standards is just plain confusing. In effect, it places a tax on Java platform development

InfoQ: How can racle better the situation where Sun couldn't?

Oracle has historically supported JCP reforms that would end the stalemate. Also they are in better financial shape than Sun was, so they can afford to reinvigorate the platform and they've publicly declared their intention to do so. Finally, with a changing of the guard, some historical baggage can be jettisoned. Where Sun might have seen certain changes as unpalatable, Oracle might look at the situation with fresh eyes and say "why not?"

InfoQ: Is this all strictly related to the morass of licensing issues?

No; licensing issues play a major role, but it goes beyond that. As I said before, there has been a lack of resources, leadership, and focus.

InfoQ: Is the situation surrounding the Apache Harmony project, which is in turn also used as the basis for the Android libraries, an acceptable one? (Ed: Harmony struggled with Sun over the TCK license well before Google adopted Harmony as the basis for the Android libraries. Google's decision to use Harmony rather than the OpenJDK libraries has less to do with the Harmony TCK licensing dispute than with Sun's decision to use GPLv2 for OpenJDK. Google's partners wouldn't agree to redistribute it without a more permissive license. The Apache group was at one point offered a qualified TCK license, but rejected it because the field-of-use restrictions were unacceptable to Apache and the JCP EC who believed them to violate the JCP agreement.)

No. As I said before, it stands in the way of the health and progress of the platform. Also it is causing companies to waste tremendous amounts of engineering effort, splitting their resources needlessly between Harmony and OpenJDK.

InfoQ: How would you like to see Oracle react to things like Harmony?

I would like to see them enact the resolution they proposed at the JCP EC Meeting of December 12, 2007:


Resolution 1 (proposed by Oracle, seconded by BEA)

"It is the sense of the Executive Committee that the JCP become an open independent vendor-neutral Standards Organization where all members participate on a level playing field with the following characteristics:

  1. members fund development and management expenses
  2. a legal entity with by-laws, governing body, membership, etc.
  3. a new, simplified, IPR Policy that permits the broadest number of implementations
  4. stringent compatibility requirements
  5. dedicated to promoting the Java programming model

Furthermore, the EC shall put a plan in place to make such transition as soon as practical with minimal disruption to the Java Community."

As for the "new, simplified IPR Policy," I believe it would be highly beneficial to the entire community if a widely accepted permissive open source license such as Apache or BSD were adopted for all components of all Java specs.

InfoQ: What do you see as Oracle's role?

I would dearly love to see them reclaim Sun's role as leader and steward of the Java platform. Of course things will be a bit different now, because the world has changed. Other organizations will contribute more resources and share more control.

InfoQ: For that matter, how do you think things like Dalvik fit in the brave new Oracle Java landscape?

In the brave new world of open source, multiple related platforms are a given. There are many Unix-like operating systems and many Linux variants, optimized for many uses. I see Dalvik as a VM designed with a very different set of design goals and constraints from HotSpot or JRockit.

InfoQ: Following up on that: how do you see Java ME evolving? Being outright replaced? Could Sun "bless" Android as the next-gen Java ME? How can Java ME compete in an Android/iPhone world?

I don't think it's appropriate for me to speculate on this one, though it is worth pointing out that there's certainly a place for "feature phones" (as opposed to "smart phones") in the developing world, and Java ME was designed with feature phones in mind.

InfoQ: At least one, recent index (Tiobe's list) has shown a decline in the use of Java.

It showed a slight decrease in Java use and a corresponding increase in C use. I'm not sure if this is real or a statistical anomaly, but it is amusing to see a 35-year old "universal assembly language" at the top of Tiobe's list. I confess to having a soft spot in my heart for C.

InfoQ: This is probably provable (one way or another), but do you suspect that the JVM's use has decreased over all, or that Java proper has decreased while Ruby/Scala /Jython /Groovy have taken up the slack?

Actually none of these languages make Tiobe's top 20. That doesn't mean they aren't important or valuable; they are. But they aren't mainstream, yet. That said, I'm absolutely thrilled by the amount of language research and design going on these days. There are plenty of good ideas out there, and it's marvelous that people are exploring them.

InfoQ: Do you think Java's on the decline, or that we should be concerned?

I think it's fair to say that Java's had a hard couple of years. But I do not think the platform or the language are in decline. I think there is some danger of a decline, but I'm counting on Oracle and the Java community to prevent it. Yes, I do believe it's cause for concern. I believe a strong Java is good for the programming public: corporations, higher education, K-12, the open source community, you name it.

InfoQ: What, in your opinion, could hope to replace it (that's not also on the JVM)?

With the exception of CLR which is in-practice a Windows-only platform, there's no real alternative to the JVM on the horizon. In fact, there's no real alternative to the Java programming language either. There are plenty of other great programming languages, but none with the same "design center." A language is a tool, and we should use the right tool for the job. One size does not fit all.

InfoQ: Is there a business case to be made for licensing the JRE?

Perhaps some esoteric variants. But I believe it's in Oracle's interests, just as it was in Sun's, to keep the JRE ubiquitous.

InfoQ: Following up on the last one, a bit, but also as a standalone point: how do you feel about the proposed reconciliation of the JRockit JVM and the Sun JVM and various other VM technologies?

In principle I believe it's a good thing to take the best parts of the various JVMs and combine them into something even better. But remember that Sun never even succeeded in combining the client and server variants of HotSpot. Combining multiple systems is where angels fear to tread. It's sometimes doable, but never easy. Failed efforts can be very costly.

InfoQ: Anything else you might add? What do you feel needs to be said?

I just want to remind people that many recent Java success stories are getting lost in all the gloom and doom. Among them are Google Collections, Guice, the JVM languages you referred to earlier, and Android. With swift, decisive action on Oracle's part, and cooperation from the broader Java community, I see a bright future ahead for the Java platform.

Rate this Article