Tuesday, 23 August 2011

Java 7 Vs. Java 8

Java 7 (codename Dolphin) is a major update to Java which was launched on July 7 of 2011 and was made available on July 28, 2011.The development period was organized into thirteen milestones; on February 18, 2011, milestone 13, the last milestone was reached.On average 8 builds, which generally included enhancements and bug fixes, were released per milestone. The Feature list at the Open JDK 7 project lists many of the feature changes.

The feature additions for Java 7:

  • JVM support for dynamic languages, following the prototyping work currently done on the Multi Language Virtual Machine
  • Compressed 64-bit pointers Available in Java 6 with -XX:+UseCompressedOops
  • Language changes:
  • Strings in switch
  • Automatic resource management in try-statement
  • Improved Type Inference for Generic Instance Creation
  • Simplified Varargs Method Invocation
  • Binary integer literals
  • Allowing underscores in numeric literals
  • Catching Multiple Exception Types and Rethrowing Exceptions with Improved Type Checking
  • Concurrency utilities under JSR 166 
  •  New file I/O library to enhance platform independence and add support for metadata and symbolic links. The new packages are java.nio.file and java.nio.file.attribute
  • Library-level support for Elliptic curve cryptography algorithms 
  •  An XRender pipeline for Java 2D, which improves handling of features specific to modern GPUs
  • New platform APIs for the graphics features originally planned for release in Java version 6u10
  • Enhanced library-level support for new network protocols, including SCTP and Sockets Direct Protocol
  • Upstream updates to XML and Unicode
Lambda, Jigsaw, and part of Coin were dropped from Java 7.

Java 8 is expected in October 2012 and will include at a minimum the features that were planned for Java 7 but later deferred.

  • Modularization of the JDK under Project Jigsaw
  • Language-level support for lambda expressions (officially, lambda expressions; unofficially, closures) under Project Lambda. There was an ongoing debate in the Java community on whether to add support for lambda expressions. Sun later declared that lambda expressions would be included in Java 8 and asked for community input to refine the feature.
  • Parts of project Coin that are not included in Java 7
The Java SE 8 Platform Specification will build upon the Java Language Specification, the Java Virtual Machine Specification, and the Java SE APIs defined in Java SE 7. The Platform Specification does not itself define new features, or enhancements to existing specifications; rather, it enumerates features and enhancements defined in component JSRs or through the JCP maintenance process. The Java SE 8 Platform Specification will aim to support the creation of maintainable, scalable, and high-performance Java applications across a range of computing environments.

"Java 8 is supposed to set the scene for the cloud, for a wider deployment arena," said Mark Little, senior director of engineering for Red Hat's middleware business, as well as Red Hat's primary liaison for the JCP. Oracle left out many of the advanced features planned for Java 7 in order not to further delay the release, he noted. Those releases may very well be included in Java 8. At least two of those features will prove instrumental in making the next version of Java ready for wide-scale cloud deployment, Little said. One is multitenancy, or the ability for the Java Virtual Machine (JVM) to safely run multiple applications. The other is modularity, or a reorganization of the JDK (Java Development Kit) into a set of cleanly defined though interdependent modules.

In many ways, Java 8 will be the true test of how Oracle manages a complex open-source project, one with many contributors from so many competing interests.

No comments:

Post a Comment