Java 9 tutorial : New features introduced



In this java tutorial we will learn new features which will be introduced in Java 9. Java 9 is likely to be introduced in March 2017.


JAVA 9 : New feature 1 >
Improvement in API’s for controlling and managing the OS processes
Improvement in API’s for controlling and managing the OS (operating system) processes.
Limitations of current API’s forces developers to turn to native code, i.e. developers has to depend more on platform specific code.



Currently Java SE provides only limited support for handling native OS processes.
Many huge applications like enterprise applications have multiple JVM’s and processes. So, they need to have the ability to
  • get the process id (PID) of current jvm and also the pid of processes which were created with the the existing API.
  • Mention the name, pid of all the processes running on the system.
  • Deal with the sub processes process .
  • Also deal with the process tree.

JAVA 9 : New feature 2 >
Improve the way JVM compiler is handled
Java 9 looks to improve the way JVM compiler is handled. Improve the performance of JVM compiler. With this change JVM compiler could be managed at runtime and also have method dependent compiler flags so that JVM compiler tests could be executed without any need of restarting the whole JVM. It will also add encapsulation (OOP principal) to compiler design.


Compiler directive >
Compiler directive is the set of all options required to control the JVM compilers.
Compiler directives contains instructions on how to compile.


How to load compiler directive file in java 9?
Compiler Directives files can be loaded from CMD (command line).


What will be format of compiler directives file?
Compiler directives file have human readable file format.
Compiler directives file format will be a subset of JSON with some minor additions.
So what will be difference between json and Compiler directives file format >
  • It will allow comments >   "//"
  • Extra trailing will be allowed in arrays and the objects > '',"
  • Escape characters are not likely to allowed.
  • Number types Supported > only int and double.


Compiler directives file can use all the UTF-8 characters as supported by the JVM specification.
Reserved characters for the Compiler directives file >
curly brace open > {
curly brace end > |
square brace open > [
square brace end > ]
quotes > "
colon > :
comma > ,

JAVA 9 : New feature 3 >
G1 as default Garbage Collector
G1 will be introduced as default Garbage Collector in Java 9.

JAVA 9 : New feature 4 >
Image support for widely used TIFF format
Image support for widely used TIFF format will also be added in Image I/O framework i.e. in javax.imageio in Java 9. Currently java supports only PNG and JPEG formats.


I will keep on updating this article further to add more new features of Java 9.

Summary >
In this java tutorial we learned new features of Java 9.


Having any doubt? or you you liked the tutorial! Please comment in below section.
Please express your love by liking JavaMadeSoEasy.com (JMSE) on facebook, following on google+ or Twitter.

RELATED LINKS>

No comments:

Post a Comment