Java 14 

Java 14 is a non-LTS feature release following Java 13. It preceded Java 15 (September 2020). Java 14 reached end-of-life in September 2020 and receives no further updates. 

Java 14 Release Details

Release DetailsMarch 17, 2020
LTSNo
OpenJDK End-of-LifeSeptember 15, 2020
Notable ForSwitch expressions finalized, pattern matching preview, records preview, helpful NPEs 

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

Java 14 Language Features 

Switch Expressions (JEP 361) 

Switch expressions are finalized. Switch can now return a value and be used in assignments. Arrow syntax (case L ->) eliminates fall-through. This completed a three-release journey: preview in Java 12 (JEP 325), second preview in Java 13 (JEP 354), final in Java 14. 

int numLetters = switch (day) { 

    case MONDAY, FRIDAY, SUNDAY -> 6; 

    case TUESDAY                -> 7; 

    case THURSDAY, SATURDAY     -> 8; 

    case WEDNESDAY              -> 9; 

}; 

Pattern Matching for instanceof (Preview, JEP 305) 

The first preview of pattern matching in instanceof checks. The variable is bound within the if block without an explicit cast. Previewed in Java 14, finalized in Java 16 (JEP 394). 

if (obj instanceof String s && s.length() > 5) { 

    System.out.println(s.toUpperCase()); 

Records (Preview, JEP 359) 

First preview of records, a compact syntax for immutable data carriers. The compiler generates the constructor, accessors, equals, hashCode, and toString. Previewed in Java 14 and 15, finalized in Java 16 (JEP 395). 

record Point(int x, int y) {} 

Text Blocks (Second Preview, JEP 368) 

Second preview of multi-line string literals (first preview was Java 13, JEP 355). Added two new escape sequences: \s for a single space and \<newline> to suppress the line break. Finalized in Java 15 (JEP 378). 

Java 14 API and JVM Changes 

Helpful NullPointerExceptions (JEP 358) 

The JVM now prints exactly which variable was null in a chained expression. Previously, a NPE on a.b.c.d only showed the line number. Now it shows Cannot invoke “String.toLowerCase()” because “a.b.c” is null. 

JFR Event Streaming (JEP 349) 

Java Flight Recorder events can now be consumed continuously via jdk.jfr.consumer.EventStream, without dumping to a file first. Enables real-time monitoring of GC pauses, thread stalls, and CPU usage from within the application. 

Packaging Tool (Incubator, JEP 343) 

jpackage creates native installers (msi, rpm, deb, pkg, dmg) that bundle a JVM with the application. Eliminates the need for users to install Java separately. Incubated in Java 14, production-ready in Java 16 (JEP 392). 

Non-Volatile Mapped Byte Buffers (JEP 352) 

java.nio supports non-volatile memory (NVM/PMEM) via MappedByteBuffer. Targeted at persistent memory devices like Intel Optane. The JVM ensures writes are flushed to persistent storage before the buffer is considered durable. 

Java 14 Removals 

JEPChangeImpact
JEP 363Remove CMS Garbage Collector The Concurrent Mark Sweep collector, deprecated since Java 9, is removed. Use G1 or ZGC instead 
JEP 367Remove Pack200 APIs and Tools java.util.jar.Pack200 and the pack200/unpack200 tools are removed. Use jlink for compact deployments 

Java 14 Deprecation

JEPChangeImpact
JEP 362Deprecate Solaris and SPARC Ports Removed in Java 15 (JEP 381) 
JEP 366Deprecate ParallelScavenge + SerialOld GC Uncommon GC combination marked for removal 

Java 14 Upgrade Path 

Java 14 has been end-of-life since September 2020. Recommended upgrade targets: 

  • Java 17 LTS: Minimum recommended LTS. Includes sealed classes, records (final), pattern matching for instanceof (final), and strong encapsulation of JDK internals 
  • Java 21 LTS: Adds virtual threads, pattern matching for switch, record patterns, generational ZGC 
  • Java 25 LTS: Current LTS. Adds scoped values, compact source files, AOT method profiling, compact object headers 

Azul’s Java 14 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!