Java SE 17 Final Release Specification
Java API Diff page: +,-,change
New Features and Enhancements
- specification: Finalized sealed classes with no changes from JDK 16
- specification: Pattern Matching for switch (Preview). Enhance the Java programming language with pattern matching for switch expressions and statements, along with extensions to the language of patterns
- core-libs/java.util: Enhanced Pseudo-Random Number Generators. Added RandomGenerator interface now implemented by legacy classes
- hotspot/compiler: Modernization of Ideal Graph Visualizer (a tool to explore visually and interactively the intermediate representation used in the HotSpot VM C2 just-in-time (JIT) compiler)
- tools/javadoc(tool): Source Details in Error Messages. When JavaDoc reports an issue in an input source file, it displays the source line for the issue, and a line containing a caret (^) pointing to the position on the line, in a manner similar to compiler (javac) diagnostic messages.
- tools/javadoc(tool): New Page for "New API" and Improved "Deprecated" Page. JavaDoc can now generate a page summarizing the recent changes in an API.
- core-libs: Foreign Function & Memory API (Incubator). Call code and data outside of Java, without JNI.
- core-libs/java.io:serialization: JDK Flight Recorder Event for Deserialization in order to monitor deserialization events.
- core-libs/java.time: Add java.time.InstantSource. Abstraction from java.time.Clock that only focuses on the current instant and does not refer to the time zone
- core-libs/java.util: Hex Formatting and Parsing Utility.
- hotspot/compiler: New Class Hierarchy Analysis Implementation in the HotSpot JVM. Enhanced handling of abstract and default methods which improves inlining decisions made by the JIT-compilers. The new implementation supersedes the original one and is turned on by default
- security-libs/javax.crypto: SunJCE Provider Supports KW and KWP Modes With AES Cipher.
- tools/javadoc(tool): "Related Packages" on a Package Summary Page.
- core-libs/java.lang: Make floating-point operations consistently strict, rather than have both strict floating-point semantics (strictfp) and subtly different default floating-point semantics. This will restore the original floating-point semantics to the language and VM, matching the semantics before the introduction of strict and default floating-point modes in Java SE 1.2.
- Added new method to Map.Entry: copyOf(java.util.Map.Entry).
- client-libs/javax.swing: New API for Accessing Large Icons
- core-libs/java.net: DatagramSocket Can Be Used Directly to Join Multicast Groups
- core-libs/java.nio: Add support for UserDefinedFileAttributeView on macOS
- core-libs: Console Charset API
- core-libs/java.io:serialization: Implement Context-Specific Deserialization Filters
- core-libs/java.lang: System Property for Native Character Encoding Name
- hotspot/compiler: Experimental Compiler Blackholes Support.
- hotspot/compiler: macOS/AArch64 Port.
- hotspot/runtime: Unified Logging Supports Asynchronous Log Flushing.
- infrastructure/build: macOS on ARM Early Access Available.
- security-libs/java.security: Provide Support for Specifying a Signer in Keytool -genkeypair Command.
- security-libs/javax.crypto:pkcs11: New SunPKCS11 configuration properties
- security-libs/javax.crypto:pkcs11: SunPKCS11 Provider Supports ChaCha20-Poly1305 Cipher and ChaCha20 KeyGenerator if Supported by PKCS11 Library
- security-libs/javax.net.ssl: Configurable Extensions With System Properties
- security-libs/org.ietf.jgss:krb5: Use permitted_enctypes if default_tkt_enctypes or default_tgs_enctypes is not present.
Removed Features and Options
- core-libs: Strongly Encapsulate JDK Internals. The java launcher option --illegal-access is obsolete. Existing code that must use internal classes, methods, or fields of the JDK can still be made to work by using the --add-opens launcher option, or the Add-Opens JAR-file manifest attribute, to open specific packages.
- core-libs/java.rmi: JEP 407: Remove RMI Activation.
- hotspot/compiler: JEP 410: Remove the Experimental AOT and JIT Compiler.
- core-libs: Removal of sun.misc.Unsafe::defineAnonymousClass.
Deprecated Features and Options, other notes and differences between Oracle JDK and OpenJDK not included, except:
- Deprecate the Applet API for Removal (It is essentially irrelevant since all web-browser vendors have either removed support for Java browser plug-ins or announced plans to do so)
- Deprecate the Security Manager for Removal (It has not been the primary means of securing client-side Java code for many years, and it has rarely been used to secure server-side code)