Java 9, the next major version of the enterprise language platform, should be delayed again, a high-ranking Java official at Oracle has advised. Instead of arriving in March 2017, it has delayed, and the new schedule mentions a date of 27th July 2017 for the General availability of Java 9 Standard Edition (SE). Throughout this article, wherever we have mentioned Java 9, it is about the Standard Edition only.

Maintainers of many popular projects are testing against the JDK 9 early access builds, but Oracle would like to see even more to be confident that potential issues have been found and reported. The developers and freelance gigs are eagerly waiting for Java 9!

Project Jigsaw itself was pushed out from JDK 8 to Java 9. The chief architect of Oracle’s Java Platform Group, Mark Reinhold announced that while work on JDK 9 is coming along nicely, unfortunately, they are not where they planned to be.

He added that Minor enhancements and even strongly justified proposals to target new JDK Enhancement Proposal (JEP) to JDK 9 would be considered, so long as they do not add undue risk to the overall release. The JEP is a process of Oracle for collecting proposals for enhancements to the Java Development Kit and OpenJDK. Oracle’s main focus is to use this additional time to stabilize, polish, and fine-tune the features that are already there rather than add a bunch of new ones.

The flagship features are the Jigsaw project, APIs including Process API updates, JSON as part of java.util and money handling API.

Project Jigsaw

The primary goals of this Project are to:

• Make the Java Standard Edition Platform, and the JDK, more easily scalable down to small computing devices

• Improving the security and maintainability of Java Implementations in general, and mainly the JDK

• Enable improved application performance

• Make it easier for developers to construct and maintain the code libraries and large applications, for both the Java SE and EE Platforms.

To achieve these goals Java (Oracle) proposed to design and implement a standard module system for the Java Platform and to apply that system to the Platform & JDK. The module system has to be powerful enough to modularise the JDK and other old code bases, yet still be approachable by all developers or freelance web developers.

API Updates

So far there has been a limited ability for managing the operating system processes with Java. For example, to do something as simple as getting your process PID today, you would need to either native access code or use some workaround. More than that, it would require a separate implementation for each platform to guarantee you’re getting the right result.

Java 9 REPL (JShell)

Oracle Corp has introduced a new tool called “jshell”. It stands for Java Shell and also known as Read Evaluate Print Loop (REPL). It is used to execute and test any Java Constructs like class, interface, enum, object and statements with ease.

Oracle Methods for List, Set, Map, and Map.Entry

Oracle has introduced some convenient methods to create Absolute List, Set, Map, and Map.Entry objects. These methods are used to create empty or non-empty Collection objects.

Private Methods

To avoid redundant code and more re-usability, Oracle Corp is going to introduce private methods in Java 9 Interfaces. From Java 9 onwards, you can write private and private static methods too in an interface using ‘private’ keyword.

Try With Resources Improvement

Java 7 has introduced a new exception handling construct: Try-With-Resources. The goal of this new statement is “Automatic Better Resource Management”. Java 9 is going to provide some enhancements to this statement to avoid verbosity and improve readability.

Reactive Streams

The Reactive Programming is very popular at present in developing applications to get some great benefits. Scala, Play, Akka, etc. frameworks have integrated the Reactive Streams and getting benefits of the same. Oracle is also introducing new Reactive Streams API in Java SE 9. The new Java Reactive Streams API is a Publish or Subscribe Framework to implement Asynchronous, Scalable and Parallel applications easily using Java language.

Optional Class

In the latest release, Oracle has added some useful new methods to java.util.Optional class.
Stream API Improvements.

In Java 9, Oracle Corp has added four useful new methods to java.util.Stream interface. All new implemented methods are the default methods. Two of them are very important: dropWhile and takeWhile methods.

HTTP 2 Client

In Java 9, Oracle is releasing new HTTP 2 Client API to support HTTP/2 protocol and WebSocket features. As existing HTTP Client API has numerous issues, they are replacing this HttpURLConnection API with a new HTTP client.

Мulti-Resolution Image API

In Java SE 9, Oracle Corp is going to introduce a new Мulti-Resolution Image API. The important interface in this API is MultiResolutionImage. It is available in java.awt.image package.

Miscellaneous Java 9 Features

• GC (Garbage Collector) Improvements
• Stack-Walking API
• Filter Incoming Serialization Data
• Deprecate the Applet API
• Enhanced Method Handles
• Java Platform Logging API and Service
• Compact Strings
• Parser API for Nashorn
• Javadoc Search
• HTML5 Javadoc

Early-access builds of JDK 9

Java 9 SE is almost ready, and every day new updates are getting published. The Early-access builds of JDK 9 with Project Jigsaw are available for download. The EA builds contain the Java Platform Module System, as well as that of the JDK-specific APIs and tools.

Oracle Team want you to try a few things and provide feedback:

• Try running your existing applications, without change, on these builds to see whether the module system or the modularization of the platform. You can check whether it breaks the code or identifies code that depends upon JDK APIs or other unspecified aspects of the Java platform.

• You can experiment with the module system itself referring to the quick start guide. Start thinking about how to migrate existing application components to modules.

After the release, the dedicated servers and desktops will get updated, and soon the release has to be implemented to the SaaS to make sure the Applications on Cloud also start getting the benefits of the new major release.

 

Image Source: Takipi Blog – http://blog.takipi.com/

Kitty Gupta