Java 9 Top Features

Java 9 will be released in March 2017, there will be a LOT of new features and small updates. Well, here are some major features that will come with it.

Modularization with Jigsaw

The primary goal of Jigsaw for Java is to make the Java Standard Edition and the Java Development Kit more scalable, especially for small devices. Jigsaw should also help to optimize the construction and maintenance of libraries and large applications (JEE and JSE) and improve security and application performance. To archive this, Jigsaw introduces a modular system to Java, the goals of which are a reliable configuration, strong encapsulation, being a scalable platform, ensure a greater platform integrity and improve performance considerably. Click here for more details.

Make G1 the default garbage collector

The G1 will replace the Parallel GC from now on as the default garbage collector. While Parallel GC was throughput-oriented, G1 is optimized for minimum pauses. That means of course less throughput, but should minimize the overall latency of the application. Also the feature of concurrent class unload was added to the G1 which finally makes it a fully featured garbage collector. Click here for more details.

Easier process handling with updated ProcessAPI will be improved

The ProcessAPI will be improved to ensure that nobody will have to use native code for process management any more. You will be able to enumerate system processes and get some relevant properties, for example the process id, process name, process state and maybe even resource usage. The updated API will also be able to deal with process trees (especially destruction of process trees) and handle many subprocesses. This includes the possibility of multiplexing their output streams to avoid one thread per process, as it is the case now. Click here for more details.

Java Shell

Finally, Java will get its own read-evaluate-print-loop (“REPL”), called JShell (former project Kulla). It will evaluate declarations, expressions and statements on the command line. This tool could make Java far easier to learn for beginners, but could also be useful for professionals (for example for testing code snippets). JShell will also provide an API for other applications. Click here for more details.

HTTP/2 Client

HTTP/1.1 is getting old, so Java will provide a new API for HTTP/2 with Java 9. This API will implement HTTP/2 and Websockets and will replace the old HttpURLConnection API. It will support multiplexing and resource push as new features, also HTTP header compression will be provided, as well as support for HTTPS/TLS. The new API should be easy to use, but will be backwards compatible with existing WARs. It is made to cover about 80-90% of your application’s needs. Performancewise, the new API is aiming to be on par with NettyIO’s performance. Click here for more details.

Various

There are also a lot of small adjustments and optimizations, like multi-release support via manifest.mf for different platforms or java versions, improved contended locking, segmented code caching, HTML5 JavaDoc, some convenience factory methods for collections (e.g. List.of(“a”, “b”, “c”) which will return a List), a common logging platform for the entire JVM, multiresolution images, a Datagram Transport Layer Security (DTLS), more concurrency updates with enhancements to the CompletableFuture API and much more.

What did not make it?

Besides all these new features in Java 9, there are also some projects that did not make it in Java 9 and will be coming at the earliest with Java 10. For example, the CurrencyAPI, which should provide an API for representing, transporting and performing money-related calculations, was moved to Java 10. The new lightweight JSON API was also delayed. Project Valhalla, which will introduce Value Types, as well as an updated Generics specification and enhanced volatiles will not be in Java 9 either and is expected to be the biggest feature for Java 10.

Short URL for this post: http://wp.me/p4nxik-2GS
This entry was posted in Did you know?, Java Basics and tagged , , . Bookmark the permalink.

8 Responses to Java 9 Top Features

  1. Pingback: Java Weekly 32/16: Robots, Java 9, Asynchrony and Java EE 8

  2. Nothing new…it’s still old, ugly, verbose, complicated, slow and developer-unfriendly Java….

    • Erik says:

      or you can see it this way…it’s robust, stable, much more easier then scala or .net cause of fewer language features, logical and therefor investment safe if you are running a company and IT is mission critical for you

  3. Pingback: JShell | techscouting through the java news

  4. Pingback: Jigsaw – Java 9 | techscouting through the java news

  5. Pingback: The G1 Garbage Collector | techscouting through the java news

  6. Pingback: Process API – Java 9 | techscouting through the java news

Leave a Reply