Five years after Java 6, Oracle has just released Java 7!
This is the first release of Java since Oracle bought Sun Microsystems.
This new version of Java introduces a lot of new features, but some of the languages new features will be introduced in Java 8 as stated by the “Plan B”.
In this version, there some great new language features, as stated by the JSR …
Posts Tagged ‘Java 7’
I was presenting the Plan B of JDK 7 the last week and apparently, this plan has been approved.
The JDK 7 Features page has been updated on the site of Oracle.
So here are the (definitive ?) list of features for JDK 7 :
JSR 292: Support for dynamically-typed languages (InvokeDynamic)
Languages update of the project Coin
Concurrency and collections updates (jsr166y)
ionet JSR 203: More new I/O APIs for …
Mark Reinhold has posted a message about the planning of Java 7. In this message, he explains that the current schedule of the JDK 7 is completely unrealistic. This delay is due to the add of new projects (lambda, Coin, Jigsaw) and the acquisition of Sun by Oracle.
The current estimate by the team is that the JDK7 can be complete for a release …
I’ve made another updates to my file copy benchmark.
First of all, I used my little utility class to automatically create the graphs. The graph are a little less clean, but I spare a lot of time not creating them myself.
Then, I’ve also made some corrections on the code :
I”ve used a buffer size of 8192 instead of 4096
I’ve made some corrections using the channels …
From the build 105, the compiler and runtime of Java 7 Releases have support for the new form of try : try-with-resources, also called ARM (Automatic Resource Management) blocks.
This new statement make working with streams and all kind of closeable resources easier. By example, in Java, you can have this kind of code :
private static void customBufferStreamCopy(File source, File target) {
…
Brian Goetz, from Oracle, has posted an updated proposal for the lambda expressions : State of the Lambda
Here are some examples of closures taken from the proposal :
We can use lambda expressions to replace the heavy usage of Single Abstract Method (SAM) interfaces :
public interface CallbackHandler {
public void callback(Context c);
}
CallbackHandler cb = { c -> System.out.println("pippo") };
We can …
Java 7 introduces very interesting features for desktop windows :
Transclucency for windows : Make a full window translucent with a specified alpha level
Per pixel translucency : Make a part of the window translucent.
Shaped windows : You can now create windows with a certain shape, like circle, ovale, triangle, …
We’ll see all this features in that post. All the examples are tested in Windows Seven …
At this time, we aren’t sure that the closures will be included in the Java 7 release. But these doubts have generated a new project : The “public defender methods” proposal.
This new proposal for Java 7 wants to improve the interfaces allowing to add new methods to existing interfaces. The classes implementing the interfaces doesn’t need implements these methods. The implementation of these methods …
2 days ago, Oracle pushed a first version of the closures implementation. We can see the evolving syntax in the test cases they made for the Java compiler. You can see these test cases here.
This revision supports the following features (copied from revision) :
Function types syntax
Function types subtyping
Full support for lambda expression of type 1 and 2
Inference of thrown types/return type in a lambda
Lambda …
I’m happy to announce that an other improvement from the Project Coin has be marked for inclusion in Java 7 : Improved Exception Handling for Java, from Neal Gafter. This has been announced by Joe Darcy on his blog.
This improvement add two litlte improvements to exception handling :
Multicatch : You’ll now be able to catch multi exceptions type in one catch block
Final Rethow …
