jdk 17 latest features

JDK 17: The Latest Features in Java 17 Release

The Java Development Kit (JDK) is an important platform element for creating Java applications.

It is from one of three core technology packages utilized in Java programming, accompanying the other two that are JRE (Java Runtime Environment) and JVM (Java Virtual Machine).

It’s crucial to distinguish among these three technologies, and understand how are they connected.

The JVM serves as the Java platform component that helps in executing programs. Secondly, the JRE works the on-disk part of Java that creates the JVM.

Lastly, the JDK empowers developers to build Java programs that can be executed and run by the JRE and JVM.

The JRE can also be utilized as a standalone component to directly run Java programs, but it’s additionally part of the JDK.

This JDK needs a JRE as running Java programs is a part of developing them.

Java Development Kit Java 17 is expected to launch in September 2021, and it holds around four proposals so far.

This JDK 17 will be a long-term support (LTS) variant, which implies that it will be having extended Oracle support for several years to come.

Here are the features targeted under this new version and registered as a part of OpenJDK’s JDK 17:

jdk17 latest feature infographic

1) Elimination of the Experimental JIT and AOT Compiler

This removal of the JIT and AOT compiler, which was having some use but needed significant maintenance effort.

This plan calls for sustaining the Java-level JVM compiler interface so that developers can continue utilizing externally built versions of the compiler for JIT compiling.

These experimental features were not incorporated in JDK 16 and no one complained. Following the prescribed plan, three JDK modules would be excluded: JDK.aot; the Graal compiler; internal.VM.compiler; and the JDK.internal.VM.compiler.management.

HotSpot code associated with AOT compilation would also be excluded.

2)Porting the JDK to MacOS/AArch64

Porting of JDK to MacOS/AArch64 is done in response to Apple’s strategy to transition its Macintosh machines from x64 to AArch64.

Java already has an AArch64 port for Linux and work is in process for Windows. Java developers assume to reuse existing AArch64 code from these ports by using conditional compilation, to settle variations in low-level protocols such as the set of reserved processor registers and the application binary interface.

3) Deprecating the Applet API for Removal

The Applet API is unnecessary as all web browser businesspeople either have eliminated support for Java browser plug-ins or have declared plans to do the same.

This API was deprecated, but not for elimination, earlier in Java 9 during September 2017.

4) The Latest Rendering Pipeline for MacOS

A new rendering pipeline for macOS, utilizing the Apple Metal API as an option to the current pipeline that utilizes the deprecated OpenGL API.

This plan is designed to present a completely functional rendering pipeline for the Java 2D API that employs the MacOS Metal framework and also stands alert in case if Apple eliminates the OpenGL API from a forthcoming version of macOS.

This pipeline is proposed to produce functional similarity with the current OpenGL pipeline, with the same or better performance in select benchmarks and applications.

A clear architecture would be designed that matches the current Java 2D model.

5) Improved Pseudo-Random Number Generators 

Enhanced and Advanced pseudo-random number generators that provide new interface types and implementations for pseudorandom number generators.

A modern interface, RandomGenerator, would provide a consistent API for all current and new PRNGs.

Taking this plan further means focusing on various areas for growth in the field of pseudorandom number generation in Java.

This effort does not ask for producing implementations of various other PRNG algorithms. However, three common added algorithms are widely deployed in other programming language environments.

The purpose of this plan includes:

  • Making it more effortless to utilize multiple PRNG algorithms interchangeably in applications.
  • Enhanced support for stream-based programming, producing streams of PRNG objects.
  • Removal of code duplication in current PRNG classes.
  • Maintenance of actual behavior of class java.util.Random.

To Conclude:

In the upcoming months, it’s expected that more features would be added for Java 17.

Various events incorporate a vector API, foreign linker API, and a foreign-memory access API, each of which was earlier in an incubator stage in the JDK 16 release announced on March 16.

Sealed classes, in the next preview in JDK 16, could become commonly available in JDK 17.

Another proposal of JDK 17 would be to focus on Pattern matching as well.