Java JavaOne
Guillermo Castro  

JDK 7 and Java SE 7 session

Mark Reinhold just finished his presentation that describes what lies ahead for Java 7. He divided the new features in 5 topics: Productivity, Performance, Universality, Modularity Integration, Serviceability.

In the Productivity area, we should expect to see new features like simplified Generics, which allows for easier code writing by not having to repeat the generic part both in the declaration of the variable and in the instantiation of the object. There’s also the new try syntax for using resources, which allows you to declare temporal resources that need to be closed after the try block is done.

In the performance area, there are several things that come for the new version, which include the Fork/Join Framework, in which you can take a long running process and divide it in several threads, which is done automatically by the framework. Also, they introduced the concept of Lambda expressions, which is Java’s way of implementing closures, combined with default methods for Interface declarations to allow for the expressions simplification. They also introduced the concept of reification, value classes and the long awaited properties.

In the universality arena, they introduced a new project, DaVinci, which will allow first-class architectural support for languages other than java, like Ruby and Python.

Modularity integration, which they call Project Jigsaw, is probably one of the coolest features to me, and what they’re trying to do is take away the classpath "hell" in which you have to define every single jar on the command line, and instead you create modules, and use a special module definition language where you specify the dependencies. New tools are introduced for this, jpkg which creates modules, and jmod, which allows for the management of the modules. When you create a new module, you install it in a local repository. As for the dependencies, you can add external module repositories so that the dependencies are downloaded and installed automatically. They even integrate with Maven, which is great because there are already lots of resources in the different maven repositories. There’s also a new package format, jmod, which is supposed to be better for compressing java class files, and they will even support the generation of rpm (one of Linux package formats) natively.

Finally, in the Serviceability area, they mentioned something called JVM Convergence, in which they want to extend the concept of a jvm make it a black box, which means you will be running a virtual machine that might be composed of one or more real machines in the background.

As for the release schedule, it seems like they are going with plan B. In case you didn’t know, Mark Reinhold commented on his blog the current release schedule and how it was unrealistic.  Some of the features have been finished, like Project Coin (in part) , InvokeDynamic (dynamic language support) and Fork/Join Framework and some features that aren’t finished like Jigsaw (modules) and Lambda (closures). The idea is to release the completed features mid 2011, and move the rest of them to Java 8, to be released (hopefully) Late 2012.

As an ending note, he mentioned that they will continue with the same Open Source License (GPL v2 with classpath exceptions), and they want more developers to be involved in the process. More information about this can be found at the main JDK 7 site.

Leave a Reply