Building Java 9

Unified JVM logging and more compiler controls – as Oracle confirms another four Java 9 features, plans for the next generation of Java are starting to become clearer.

Oracle has unveiled a second set of features for Java 9. This is Oracle’s first official Java 9 feature list since its announcement of three new APIs and modular source code earlier this year.

Unified JVM Logging (JEP 158)

Java 9 will introduce a common logging system for all JVM components. This will overhaul how the JVM reports events in its subsystems and add common logging command-line options for loggers.

More compiler controls (JEP 165)

Oracle wants to provide more fine-grained control of the Hotspot JIT compiler with a series of control options. This improvement will give developers method-context dependent control over optimizations, as well as allowing them to change JVM compiler control options.

Deprecated GC combinations to be removed (JEP 214)

This update will remove three outdated garbage collection combinations: DefNew + CMS, ParNew + SerialOld and Incremental CMS, which were deprecated in Java 8. Oracle claims this is motivated by the cost of maintaining these GC combinations.

It is hoped that this will free up resources to simplify the HotSpit GC code, thereby reducing bugs and improving other GC combinations.

Project Coin’s “rough edges” to be smoothed out (JEP 213)

Project Coin was initiated to make some small language changes to Java 7. Having concluded that these changes “have been easy to use and have worked well in practice”, Oracle plans return to this project to fix the remaining issues left by modifications to the language. The authors make it clear that this is not a Coin 2.0 project and they will not solicit new language proposals.

SEE ALSO: What the Java community is saying about the Java 9 features

It is also confirmed that Datagram Transport Layer Security will be supported in Java 9, along with the Javadoc tool for outputting HTML5.

Oracle also announced its intention to complete the warnings cleanup project, which was started several years ago. Numerous fixes will also be made to improve import handling, and deprecated classes will no longer trigger warnings.

Java 9 modularity confirmed

Oracle has also announced its commitment to modular source code. Plans to modularize the source code of the JDK were made public earlier this year, and Oracle’s engineering team have already laid the foundations for a structured implementation of Project Jigsaw with JEP 152 and JEP 201.

SEE ALSO: Should Project Panama make it into Java 9?

Java platform’s Chief Architect, Mark Reinhold explained that Oracle’s plans to replace JAR files with modules in the JRE and JDK will have an impact on IDEs. “This will affect a small class of applications, mainly IDEs and other kinds of development tools that need to enumerate and inspect the classes stored in a run-time image.”

According to Reinhold, a new mechanism (JEP 220) will enable to enable and inspect these classes and do so “in a way that’s immune to future internal format changes”. His recent provocative statement that “The JAR format has run its course […] It’s time to move on” caused some fear among developers of JAR-based libraries and applications, which, Reinhold claims “will continue to work fine”.

The first set of Java 9 features, which were confirmed in earlier this year August, included three new APIs and three small features, and were met with a lukewarm response from the Java community.