Friday, July 29, 2011

Java 7 - it's here

Friday, July 22, 2011

JDK 7 is finally out...

...well, not yet but it will be in few days (Oracle Announces Release Date for Java 7). After Wikipedia "Java 7 (codename Dolphin) is an upcoming major update to Java, it has been launched on July 7 of 2011 and will be made available on July 28, 2011."

Here's the list of new features Java 7 will bring (consult JDK 7 project page for more details):

Features are listed in order, more or less, from lowest to highest in the overall JDK software stack.

vm JSR 292: Support for dynamically-typed languages (InvokeDynamic)
Strict class-file checking
lang JSR 334: Small language enhancements (Project Coin)
core Upgrade class-loader architecture
Method to close a URLClassLoader
Concurrency and collections updates
i18n Unicode 6.0
Locale enhancement
Separate user locale and user-interface
ionet JSR 203: More new I/O APIs for the Java platform (NIO.2)
NIO.2 filesystem provider for zip/jar
SCTP (Stream Control Transmission Protocol)
SDP (Sockets Direct Protocol)
Use the Windows Vista IPv6 stack
TLS 1.2
sec Elliptic-curve cryptography (ECC)
jdbc JDBC 4.1
client XRender pipeline for Java 2D
Create new platform APIs for 6u10 graphics features
Nimbus look-and-feel for Swing
Swing JLayer component
Gervill sound synthesizer [NEW]
web Update the XML stack
mgmt Enhanced MBeans

For me one of the most interesting changes are "Small language enhancements" that come from project Coin.
The goal of Project Coin is to determine what set of small
language changes should be added to JDK 7. That list is:
  • Strings in switch
  • Binary integral literals and underscores in numeric literals
  • Multi-catch and more precise rethrow
  • Improved type inference for generic instance creation
  • try-with-resources statement
  • Simplified varargs method invocation

All Java developers have waited for this moment since December 2006 when JDK 6 was released. It was the longest and the most painful release in Java history. It took almost five years to do it while for previous versions the period between releases was more or less two years. Of course, five years waiting for new Java was the effect of many factors like problems of Sun (eventually bought by Oracle), making JDK an open source project and thus opening a pandora's box of non-open source licenses, etc.

But it's finally here.

Now we'll wait for JDK 8 with lambda expressions that were supposed to be delivered in version 7 but actually it's good that JDK guys decided to postpone some features to finally release it.

Enjoy and celebrate the new JDK 7.