tags:

views:

3364

answers:

5

What differences will Java 7 have from Java 6, and what will it mean to us Java programmers?

I'm very curious about what the future of java holds, and I've been able to find some info on Java 7, but I want to know what all that info really means. Like what will a modular JDK do for programs?

See also: What are you looking forward to in Java 7?

+14  A: 

The preeminent source for information on the state of Java 7 is Alex Miller's blog.

To answer your question: there are no earth-shattering changes (unlike, say, Java 5), just minor improvements. All the big changes like closures, extension methods, reified generics and first-class properties are out.

cletus
I love how everything I wanted is out... ah well. Maybe next time.
geowa4
+7  A: 

The official website is here:

Official JDK Website

and a full list of features can be found here:

Open JDK Features

I think the contents of the release are still subject to change. I'm not quite sure what it really means from a developer perspective - the most obvious change ( as you mention) is that of modularisation (JSR277/Jigsaw). It's still a bit of a contentious issue, there's some official discussion here from the lead developer's (Mark Reinhold) blog:

Mark Rheinhold Blog

The interesting thing here is that Apache Harmony (which is developed out of the JCP) is already a modular JDK via OSGi manifests, more info on this here:

Project Jisaw and JSR277

Hope that helps, it'll be an interesting release!

Jon
It's probably worth putting link text in rather than raw URLs. Much more readable imho.
cletus
Err.. no I mean instead of "https://jdk7.dev.java.net" use the link feature and change the title to "Java 7 Changes" or whatever (typically the title of the page). For readability. Just a suggestion.
cletus
Ah, err ok, will do...
Jon
+25  A: 

As far as what changes you'll see in your day-to-day work, my guess is that the major impact will be stuff like JSR 203 which overhauls the file system API. If JSR 310 is included, then it would also have a major impact on how you interact with any aspect of the date and time APIs. Many of the other JSRs will only impact you if you happen to already do something in that particular area (JMX - JSR 255, concurrency - JSR 166, etc).

I think it's unknown at this point how much JSR 294 and Jigsaw will impact us day to day. It's possible that it will be a new and important way to define modules that will impact the way we bundle libraries, define dependencies, and deploy our apps. Or it may just be used in the JDK and ignored elsewhere. Only time will tell.

There will be a handful of language changes that come out of Project Coin but they are mostly going to be small useful but not revolutionary changes that help remove some boilerplate.

I think the biggest thing most people will notice may be performance. As usual, each JDK brings a whole new set of performance optimizations. We've already seen some very encouraging results in String performance, array performance, and a new concurrent garbage collector (G1). I suspect many people will find that their existing code will work and run noticeably faster than it did in the past.

Alex Miller
I'm reading often about Jigsaw. But never it is told, which modules might JDK7 might consist of. How many modules might there be? Will there be sub-modules? Thank you.
ivan_ivanovich_ivanoff
just a few in the jdk itself - core, awt, swing, tools, corba, and couple others. I don't think they will support submodules.
Alex Miller
Well, I think it is enough to create a JRE which is smaller and more attractive to be downloaded (if someone have slow connection). Can't you give us a link to some info about the possible impact of Jigsaw on JRE/JDK? Thank you.
ivan_ivanovich_ivanoff
Well, you could look at my recent blog: http://tech.puredanger.com/2009/06/04/javaone-jigsaw/
Alex Miller
Please allow me the last question about Jigsaw: In which JDK7-milestone would you expect it to arise? It's currently not listed ( http://openjdk.java.net/projects/jdk7/milestones/ ). Thank you.
ivan_ivanovich_ivanoff
I think you can find the existing work in the Jigsaw project on java.net: http://openjdk.java.net/projects/jigsaw/ Not sure when it will be merged.
Alex Miller
+2  A: 

JSR292 is the big one for me -- dynamic language support. Everything else pales into comparison next to that. I expect to see a massive improvement in JRuby, Jython, and Groovy out of that.

I'm surprised that they dropped closures -- wonder why? No way to handle the scoping without incredible amounts of pain?

Don Werve
While I agree with you that JSR 292 is huge and important, the question is actually about Java (the language), not the JVM (the platform). Or at least that's how I read it.
Alex Miller
+3  A: 

I think JSR 308 and the @Nullable/@Nonnull annotations will affect people. I expect to turn on @Nonnull as the default setting and then spend 1/2 a week making my codebase comply. I'm probably not the only team lead planning this.

You can prepare now by downloading the prototype from the JSR 308 website (http://groups.csail.mit.edu/pag/jsr308/) and running the checker against your codebase today.

Hamlet D'Arcy
I think JSR 308 will affect people to the degree that they want it to. I think some people will be turned off the verbosity required to completely annotate your code this way.
Alex Miller