What’s New in JDK 17? Key Features and Improvements for Java Developers
JDK 17, the next long‑term support release of Java, entered its final release‑candidate phase with build 35 and brings a host of enhancements—including stricter floating‑point semantics, sealed classes, pattern‑matching for switch, a new RandomGenerator API, and a modern Metal‑based rendering pipeline—while deprecating legacy APIs such as the Security Manager and Applet.
JDK/Java 16 became generally available in March as a short‑term support release with only six months of updates. The next version, JDK/Java 17, is scheduled for release on 14 September and will be a long‑term support (LTS) version with several years of extended support from Oracle.
JDK 17 is now in its second and final release‑candidate stage (RC), with the latest build being 35.
Key Features of OpenJDK 17 (per InfoWorld)
Context‑specific deserialization filters let applications choose filters per serialization operation via a JVM‑wide filter factory, enabling both context‑specific and dynamically selected filters.
Restored always‑strict floating‑point semantics ensure consistent strict behavior, replacing the previous mix of strictfp and default semantics.
Deprecation of the Security Manager, with plans to remove it in future releases; this includes deprecating related APIs such as System::exit .
Pattern‑matching for switch is expanded with preview features, adding guarded and patterns , as well as parenthesized patterns , allowing more expressive and safe data‑centric queries. The instanceof operator also supports type patterns.
Strong encapsulation of internal JDK APIs (e.g., sun.misc.Unsafe ) removes the ability to relax encapsulation via a single command‑line flag, encouraging migration to standard APIs.
Removal of the Remote Method Invocation (RMI) activation mechanism, while keeping the rest of RMI functional.
A new incubator stage for foreign function and memory APIs enables Java programs to interoperate with native code and data outside the JVM.
The platform‑independent Vector API, incubated in JDK 16, is further refined in JDK 17 to deliver high‑performance vector computations that compile to optimal CPU instructions.
Sealed classes and interfaces restrict which other classes or interfaces may extend or implement them, providing a more declarative alternative to access modifiers and supporting future pattern‑matching enhancements.
Experimental AOT and JIT compilers are removed, simplifying the JVM while preserving the ability to use external compilers via the JVM compiler interface.
Porting of the JDK to macOS/AArch64 aligns with Apple’s transition to Apple Silicon, with testing to mitigate cross‑platform risks.
Deprecation and eventual removal of the Applet API, reflecting the disappearance of Java browser plugins.
A new rendering pipeline for macOS uses the Apple Metal API as a replacement for the deprecated OpenGL pipeline, aiming for comparable or better performance while coexisting with the existing OpenGL pipeline until fully retired.
Enhanced pseudo‑random number generators introduce a new RandomGenerator interface with implementations such as jumpable and splittable PRNG algorithms (e.g., LXM), while preserving the behavior of java.util.Random .
JDK 17 LTS releases occur every three years; the previous LTS version, JDK 11, was released in September 2018. For more details, see https://jdk.java.net/17/ .
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Programmer DD
A tinkering programmer and author of "Spring Cloud Microservices in Action"
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
