Java SE 17 is live! Download JDK 17 from the Java SE Downloads page. This is the latest Long-Term-Support (LTS) release. For more information about LTS releases, see Oracle Java SE Support Roadmap.
See JDK 17 Release Notes for detailed information about this release. The following are some of the important additions and updates in Java SE 17 and JDK 17:
New Language Features
- The preview feature Pattern Matching for switch Expressions and Statements is introduced in this release. This feature allows an expression to be tested against a number of patterns, each with a specific action, so that complex data-oriented queries can be expressed concisely and safely. See JEP 406: Pattern Matching for switch (Preview) and Pattern Matching for switch Expressions and Statements in the Java Platform, Standard Edition Java Language Updates guide.
- Sealed Classes, first previewed in Java SE 15, is a permanent feature in this release. Sealed classes and interfaces restrict which other classes or interfaces may extend or implement them. See JEP 409: Sealed Classes and Sealed Classes in the Java Platform, Standard Edition Java Language Updates guide.
Library Changes
- Applications can now configure context-specific and dynamically selected deserialization filters using a JVM-wide filter factory, which is invoked to select a filter for each individual deserialization operation. See JEP 415: Context-Specific Deserialization Filters and Serialization Filtering in the Java Platform, Standard Edition Core Libraries guide.
- New interface types and implementations for pseudorandom number generators (PRNGs) are now available, including jumpable PRNGs and an additional class of splittable PRNG algorithms (LXM). See JEP 356: Enhanced Pseudo-Random Number Generators and Pseudorandom Number Generators in the Java Platform, Standard Edition Core Libraries guide.
- A new Java 2D internal rendering pipeline for macOS is implemented using the Apple Metal API. This is an alternative to the existing pipeline, which uses the deprecated Apple OpenGL API. See JEP 382: New macOS Rendering Pipeline.
- The incubator feature Foreign Function and Memory API allows Java programs to interoperate with code and data outside the Java runtime. See JEP 412: Foreign Function & Memory API (Incubator).
- The incubator feature Vector API, which was introduced in Java SE 16, has been enhanced along with performance improvements. See JEP 414: Vector API (Second Incubator).
Other Changes
- By default, all internal elements of the JDK are strongly encapsulated, except for critical internal APIs such as sun.misc.Unsafe. However, it will no longer be possible to relax the strong encapsulation of internal elements using a single command-line option as it was possible in JDK 9 through JDK 16. See JEP 403: Strongly Encapsulate JDK Internals by Default.
- The floating-point operations are now consistently strict, rather than having both strict floating-point semantics (strictfp) and subtly different default floating-point semantics. See JEP 306: Restore Always-Strict Floating-Point Semantics.
Deprecated Features
- The Security Manager and APIs related to it have been deprecated for removal in a future release. See JEP 411: Deprecate the Security Manager for Removal.
See Significant Changes in JDK 17 Release for more information.