Zareef Ahmed : Bigdata and Devops Consultant + Programmer for cloud

9 things you need to know about Java 9

9 things you need to know about Java 9

Java 9 has been released in the market. It has lots of new improvements and additions. In this article, I am enlisting 9 things of this major release.

  1. Introduction of Jshell

Now, java has joined the league of languages with a shell. Languages like python, ruby and R were having a handy shell in which we can evaluate our code on the fly. Now java has introduced Jshell using which we can eval our java code easily. The jshell tool provides an interactive command-line interface for evaluatin declarations statements and expressions of the java programming language.

2.  Jcmd

Java 9 defines additional diagnostic commands to improve the ability to diagnose issues with Hotspot and the JDK.

3. Removal of Jhat

Java 9 has removed the jhat tool from the JDK.
The jhat tool was an experimental and unsupported tool added in JDK 6. It is out of date; superior heap visualizers and analyzers have been available for many years.

4. No Launch time JRE selection.

Java 9 Removes the ability to request a version of the JRE that is not the JRE being launched at launch time.
Modern applications are typically deployed through Java Web Start (with a JNLP file), native OS packaging systems, or active installers. These technologies have their own methods to manage the JREs needed by finding or downloading and updating the required JRE as needed. This makes launch-time JRE version selection obsolete.
5. HTML5 javadoc

Now javadoc of Java 9 supports generating HTML5 output. We just need to make sure that our comments or other documentation components are HTML5 compliant.

6. Compiler Control
This new version of Java provides a way to control JVM compilation through compiler directive options. The level of control is runtime-manageable and method-specific. Compiler Control supersedes, and is backward compatible, with CompileCommand.

7. New Version-String Scheme
Now java is equipped with a simplified version-string format that helps to clearly distinguish major, minor, security, and patch update releases.
The new version-string format is as follows:
$MAJOR.$MINOR.$SECURITY.$PATCH

8. Jlink

The jlink tool defines a plug-in mechanism for transformation and optimization during the assembly process, and for the generation of alternative image formats. It can create a custom runtime optimized for a single program.

9. Project Jigsaw and JPMS

This is the  biggest feature for Java 9. Under the umbrella of Project Jigsaw, now we have  Java Platform Module System (JPMS). Jigsaw itself is a much bigger undertaking and includes things like the modularisation of the JDK itself, what’s interesting to us as developers is the JPMS.

 

Apart from these 9 changes or improvements, Java 9 has better support for SHA-3 Hash Algorithms. Algorithms like  SHA3-224, SHA3-256, SHA3-384, and SHA3-512 has been supported.

Java Plug-in has been deprecated,while still available in JDK 9, these technologies will be considered for removal from the Oracle JDK and JRE in a future release.Java 9 also  introduces a lot of small API changes that made life easier for developers.