- Published on
- 09/01/2023 09:00 am
JDK 21 and JDK 22: What We Know So Far
- Authors
- Name
- Fatih Kacar
JDK 21, the next Long-Term Support (LTS) release since JDK 17, has reached its initial release candidate phase with a final set of 15 new features, in the form of JEPs, that can be separated into four categories: Core Java Library, Java Language Specification, HotSpot and Security Library. We examine JDK 21 and predict what features may be targeted for JDK 22.
JDK 21 will be the next Long-Term Support (LTS) release of the JDK, following JDK 17. It has recently reached its initial release candidate phase, marking an important milestone in its development.
This release candidate includes a final set of 15 new features, known as JEPs (JDK Enhancement Proposals). These features are categorized into four main areas: Core Java Library, Java Language Specification, HotSpot, and Security Library.
In the Core Java Library category, JDK 21 introduces several new features and enhancements. One notable addition is the inclusion of the JEP 395: Pattern Matching for instanceof Language feature. This feature allows for concise pattern matching in instanceof expressions, making the code more expressive and readable.
The Java Language Specification category includes JEP 355: Text Blocks. This feature introduces a new syntax for multiline string literals, allowing developers to write more readable and maintainable code when working with large text blocks.
In the HotSpot category, JDK 21 brings improvements to JVM performance and scalability. JEPs like JEP 387: Elastic Metaspace and JEP 376: ZGC: Concurrent Stack Processing aim to optimize memory usage and reduce GC pauses, resulting in better application performance.
Lastly, the Security Library category includes JEP 411: Deprecate the Security Manager for Removal. This JEP proposes the deprecation of the Security Manager, which has been a part of the Java platform for a long time. It suggests alternative approaches for enforcing security policies in Java applications.
Looking ahead, we can start speculating about the potential features that may be targeted for JDK 22. Although specific details are not yet available, the Java community always looks forward to improvements and enhancements in areas such as performance, security, and developer productivity.
In conclusion, JDK 21 is an important LTS release that brings several new features and improvements to the Java ecosystem. With its release candidate phase, developers can start experimenting and providing feedback to further refine the JDK. As we eagerly await JDK 21's general availability, we can also begin looking ahead to JDK 22 and the exciting possibilities it holds.