New Features in Java 9

By | February 4, 2015

Java Programming Language is one of the most popular programming languages which is widely used in enterprise software development. The newest version of the Java SDK is Java 9 and is expected to be released in early 2016 under the name of Java Development Kit 9. This version would include enhancements in application performance, new capabilities, and support for enhanced modularity.

The Java 9 SDK aims to provide an open source implementation of the Java SE 9 Platform. One of the most important features in Java 9 is to break the Java Runtime Environment (JRE) into a collection of interoperable components.

Below are some of the new features which are included in the Java 9 :

  • Light-weight JSON API — which is a source of great speculation right now about how truly useful this feature will be (as proposed by the community process).
  • HTTP 2 Client  — for HTTP 2.0 and websockets.
  • Modular Source Code — organizes JDK source code into modules.
  • Process API Improvements  — to improve the API for controlling and managing OS processes.
  • Smart Java Compilation (Part 2) — Makes the sjavac tool available in the default JDK.
  • Segmented Code Cache — to improved execution time for complicated benchmarks.
  • HTML5 Java Doc
  • Improved contended locking —for increasing performance between threads.

1.Light-weight JSON API

The light-weight JSON API would be delivered in Java 9 SDK through the java.util package. This provides a light-weight API for parsing, generation, and consumption of JSON data.

2.HTTP 2 Client

The Hyper Text Transfer Protocol (HTTP) is an industry standard and has been in use for a long time. HTTP 2 would be released sometime around the release of Java 9. HTTP 2 promises improved page load time and API capabilities. The new HTTP Client API would replace the legacy HttpURLConnection that implements HTTP 2.0 and web sockets. Existing API is outdated, hard to use, and difficult to maintain. This is expected to provide rich options with ease of use.

3.Modularization of Source Code

Support for the modularization of source code has been introduced in Java 9. This feature enables you to reorganize the source code into modules so that it can be scaled down seamlessly for small devices as and when needed; this promotes better performance, security, and maintainability of your source code.

4.Process API Improvements

The Process API in Java 9 SDK has been updated to manage and control the processes of the OS efficiently. This new API provides features such as the ability to retrieve pid of JVM, enumerate JVM and processes, and so forth.

5.Smart Compilation

The Java 9 SDK includes an improved version of the Smart Java Compilation tool called sjavac; this facilitates improved JDK build speeds because this compiler would take advantage of all the cores in your system. The sjavac tool provides a wrapper around javac and provides support for incremental and parallel compilation.

6.Segmented Code Cache

Segmented code cache is a new feature introduced in Java 9 SDK that divides the code cache into segments; this improves performance to a considerable extent. With Java 9, you have multiple distinct code heaps instead of a single code heap. Note that each of these code heaps in Java 9 contains compiled code of a particular type, thus

improving performance. The run-time divides the code cache based on the following assumptions:

  • Code that is ever lasting; in other words, one that would be in the cache forever.
  • Code for a comparatively short lifetime
  • Code that has a potentially long lifetime

7. HTML5 Java Doc

Provide an option to java doc to request either HTML 4 or HTML5 output. The HTML5 markup should be semantic, i.e., clearly separate meaning from style and content. The pages generated using HTML5 markup should satisfy accessibility requirements.

A command-line option will be added to java doc to request a specific type of output markup. HTML4, which is the current output, will be the default. HTML5 will become the default in a later JDK release.

Leave a Reply

Your email address will not be published. Required fields are marked *