Java 20 

Java 20 is a non-LTS feature release following Java 19. It preceded Java 21 LTS (September 2023). Java 20 reached end-of-life in September 2023 and receives no further updates. 

Java 20 Release Details 

Release DateMarch 21, 2023
LTSNo
OpenJDK End-of-LifeSeptember 19, 2023
Class File Version64.0
Unicode Version15.0.0
Notable ForScoped values incubator, virtual threads second preview, record patterns second preview 

Java 20 is end-of-life. Organizations running it should upgrade to a current LTS release: Java 21 or Java 25

Java 20 Language Features 

Record Patterns (Second Preview, JEP 432) 

Second preview with enhancements including support for generic record patterns and improved nested pattern matching. Added exhaustiveness checking for record patterns in switch. Finalized in Java 21 (JEP 440). 

Pattern Matching for switch (Fourth Preview, JEP 433) 

Fourth preview with further refinements. Simplified the grammar for switch labels and improved exhaustiveness checking for enum types. Finalized in Java 21 (JEP 441). 

Java 20 API Changes 

Scoped Values (Incubator, JEP 429) 

First incubator. Provides an alternative to thread-local variables for sharing immutable data within and across threads. Designed for use with virtual threads where ThreadLocal is problematic (unbounded inheritance, mutable state). 

private static final ScopedValue<User> CURRENT_USER = ScopedValue.newInstance(); 

ScopedValue.where(CURRENT_USER, user).run(() -> { 

    // Any code here can read CURRENT_USER.get() 

    processRequest(); 

}); 

Re-previewed in Java 21-25. 

Virtual Threads (Second Preview, JEP 436) 

Second preview with refinements based on feedback. Added ability to create virtual threads from Thread.ofVirtual() builder. Fixed pinning issues in synchronized blocks and native frames. Finalized in Java 21 (JEP 444). 

Foreign Function and Memory API (Second Preview, JEP 434) 

Second preview with refinements. Improved the Linker API and added SymbolLookup.libraryLookup for loading native libraries. Finalized in Java 22 (JEP 454). 

Structured Concurrency (Second Incubator, JEP 437) 

Second incubation. Added StructuredTaskScope subtypes for common patterns: ShutdownOnFailure (cancel on first failure) and ShutdownOnSuccess (cancel on first success). Promoted to preview in Java 21 (JEP 453). 

Vector API (Fifth Incubator, JEP 438) 

Fifth incubation with bug fixes and performance improvements. Still incubating as of Java 26 (JEP 529, tenth incubator). 

Java 20 Upgrade Path 

Java 20 has been end-of-life since September 2023. Recommended upgrade targets: 

  • Java 21 LTS: Adds virtual threads (final), record patterns (final), pattern matching for switch (final), generational ZGC, sequenced collections 
  • Java 25 LTS: Current LTS. Adds scoped values, compact source files, AOT method profiling, compact object headers 

Java 20 applications should upgrade directly to Java 21 LTS, which finalized most of Java 20’s preview features. 

Azul’s Java 20 Support 

Azul Platform Core provides TCK-certified builds of current LTS releases with extended support. A single subscription covers all supported versions from Java 6 through Java 26. 

Platform Core wide 1x

Contact Us

Contact us to learn more about our migration services, support, modernization services, and more!