Skip to main content

A puny Java 7 isn't the end of the world

Posted by cayhorstmann on September 9, 2010 at 3:54 AM PDT

Mark Reinhold just published a blog stating what has been painfully obvious to everyone following the JDK 7 development: There is no way that it will ship 2010. He thinks that mid-2012 would be realistic. Having followed the Project λ discussion, I can see where he is coming from.

He asks whether Oracle should just package up what is already finished, run it through QA, and slap a Java SE 7 label on it (presumably after having it rubber-stamped by a JSR). Java SE 8 could come at the end of 2012, coinciding with the end of the Mayan long count.

To nobody's surprise, almost everyone replied that it is better to have something now than maybe have something better later.

What will be in Java SE 7? Here is the list, to the best of my knowledge, sorted in the order in which they matter to me :-)

  • Performance enhancements and bug fixes
  • Automatic resource management
  • NIO.2 (the new new I/O)
  • The fork/join framework
  • Diamond operator
  • Annotations in more places
  • invokedynamic and an API for method handles. (I'd rate this higher if I knew
  • AWT/Swing tweaks: JLayer, translucent and shaped windows, and an “improved” security dialog
  • Minor language tweaks: strings in switch, underscores in literals, binary literals
  • Nimbus

What is missing?

  • Closures
  • The parts of the fork/join framework that depend on closures to be user-friendly
  • [] notation for lists and maps
  • Modularity (AKA “Project Jigsaw”)
  • Everything that already got dropped along the way for “lack of time”, such as the Swing Application Framework, bringing SwingX controls to the core API, date/time API

Now, this isn't the end of the world. Look at the Wikipedia Java version history: The most notable Java 1.3 enhancements, besides HotSpot, were JNDI, Java Sound, and CORBA support in RMI. Not exactly earth-shattering stuff, but at the time nobody complained about Java turning into COBOL.

I think what really made people unhappy is not the modest Java 7 feature set but the five year gap since Java 6. But that's water under the bridge. It's more useful to think about where we are going. Here I am only talking about Java SE, not EE or ME.

The Java language is now pretty much at the end of its evolutionary path. Sure, some form of closures will be nice, if and when they come. But the people who care about this kind of stuff have other choices, both on and off the JVM. I have no problem with that.

On the JVM, there is still quite a bit work that can and should be tackled—see this blog.

Where we are hurting are the Java libraries. They haven't seen much love for a long time. There is a good amount of cruft all over, not just in the date/time API. Client-side UI development is in particularly bad shape. I'd like a much richer set of Swing controls than what I had in 2002, an app framework that's at least as good as MFC was 20 years ago, and audio and video that actually works. And, no, I do not want another language to write my UI. If there is anything useful in JavaFX (such as the scene graph), port it back to Java SE! And, of course, fix deployment!!! On my Windows 7 laptop, I am still getting an error message (download of the latest Java version failed) whenever I click on that orange tray icon.

Another pet peeve of mine is the WebStart API. WebStart-in-a-sandbox is a great idea, but it can only work if the sandbox works well. Making users accept "all permission" negates one of the primary benefits of using Java in the first place. I want an API that “just works” when my app runs in the sandbox—today that's only the case for printing. And I want the kind of friendly end-user permission management that cell phone apps have these days.

There is still a window of opportunity for Java to regain traction in the cross-platform desktop space. Everyone loves to bash Swing, but if you need to bang out a cross-platform app that gets lots of data from the user (as opposed to having lots of eye candy), then Swing is pretty good. And there isn't a lot of credible competition: Qt, wxWidgets, pyGTK, or Mono/WinForms aren't exactly a walk in the park either. But that window will close. (BTW, I didn't think it was a good sign that the GlassFish update tool was written with wxWidgets.)

In summary, I am ok with a modest Java 7. I am ok with a Java language that won't evolve much more. But if the Java library doesn't evolve with the times, there is trouble ahead. In particular, on the desktop, the time has come to put up or shut up.

Related Topics >>


A matter of trust...

The issues detailed in this article are now legendary. The owner of Java has failed to deliver on its promises time and again. Anecdotal evidence suggests that many developers, having moved on, no longer trust the owner of Java. Because we all know what happens to a relationship when the trust is gone.;)

Java is dead?

Everybody loves saying "Java is dead", "Java is dead".. "long live Scala"..
But the evidence is different:
  • If you search for Java on 1/4 of all jobs are Java related, but only 40 Scala related
  • According to the TIOBE index Scala barely exists while Java is #1

So I'm not affraid of the "death" of Java.
Language features are good sometimes.. people are yelling "lambda" "lambda" while really its presence or absence is not that important to most real world situations so far.
More important are:
  • Platform changes: G1 collector, optimizations, etc..
  • Libraries: continued work on libraries including parallel tools

What worries me more than Java 7 is Oracle's silly lawsuit against Google. Android was a promising Java based platform, but now we're worried about Java's future.

Find myself most agreeing too

Find myself most agreeing too though I don't have to like it. What troubles me are comments like Charles Nutter who put the delay down to the acquisition and a lack of internal leadership and control. We've probably all been reading James Goslings blog too, what I want to know is that any ruddless internals and JCP vacuum gets fixed. Its difficult not to think we cut Sun some slack over the last 12month delay because we all understood the situation, but aren't Oracle increasing investment ? how come it gets knocked back another two years on their watch? first impressions and all that..

Isn't one of the other fringe benefits of a earlier lightweight JDK7 that it's codebase is OpenJDK unlike the JDK6 lineage.. isn't that worth noting too? I suppose the JVM speed tweaks I'd welcome and invoke dynamic for the JRuby, Groovy, Scala guys to build upon though I doubt most would devs will use it directly. That and a vague uneducated fear that lamdas 'lite' not turn into another generics erasure PITA. So if these exist now why do we have to wait another year for it?

You missed beansbindings from your list of missing JSRs for me at least that would have been immensely more useful that the other UI changes. Technically nimbus, shaped windows and security changes are already in the 6.0 branch and JLayer is just a rebadged JXLayer which we'll probably have to keep shipping as jxlayer.jar to keep compatibility with Java 6 for some time to come. The SwingX controls issue was weird, not aware any genuine effort was made to include these, unlike the other JSRs there wasnt an official notice of them being dropped either due to lack of time' (re:interest?). The sad state of the Java desktop is a whole other question: though I seem to remember Danny Cowards last comment on a Swing 2.0 was it won't happen and post the JSRs (all dropped) Swing would only be maintained or possibly accept external open sourced contributions but not actively developed internally.

+1 Over lack of Java on smartphones. No Apple relaxing restrictions on dev tools won't help us much not without a iOS java runtime, though it snt a development tool so much as a runtime platform that downloads code (still forbidden). Seems jigsaw was an essential part (MVM?) of making the runtime more attractive on limited devices and thats kicked deeper into the long grass now.

Great Article!

Thank you!

I couldn't agree more!

I couldn't care less for additional language features like closures, but I do care a lot for deployment and desktop integration. Java is the only viable choice for cross-platform development for me, but the issue with deployment are really bugging me. Great article!

I agree in all points

The major requirements for Java's future are very well summarized in this blog.
Someone should print a few copies on glossy paper, frame it and hand it over to the responsible people at Oracle. They should put it on their writing table and read it every morning before starting to work.