1. Introduction

A few days ago we introduced a useful Preview feature for Java14 called JEP 359: Records(Preview). Java 14 was officially released on The 17th. Most people are still using Java 8, and they can’t eat the exhaust. But it’s not the LTS version, so don’t panic.

2. New Java14 features

This release contains more JEP (Java/JDK Enhancement Proposals) than Java 12 and Java13 combined. Sixteen new features in total. Here is a brief list:

  • 305: Instanceof Pattern Matching (Preview)
  • 343: Packaging Tool (Incubator)
  • 345: NUMA memory allocation optimization for G1
  • 349: JFR event flow
  • 352: Non-atomic byte buffer mapping
  • 358: Friendly null pointer exception
  • 359: Records (Preview)
  • 361: Switch expressions (standard)
  • 362: Deprecates Solaris and SPARC ports
  • 363: Removes the CMS (Concurrent Mark Sweep) garbage collector
  • 364: ZGC on macOS
  • 365: ZGC on Windows
  • Avenge + SerialOld GC
  • 367: Remove the Pack200 Tools and API
  • 368: Text Block (second preview)
  • 370: External Memory API (Incubator)

Details can be found in the official documentation. But I personally don’t think there are many new features available, so again, don’t panic.

3. How do we choose the JDK version

In fact, there are many students who do not know that since the JDK revised the release strategy to accelerate the iteration speed, each year in March and September will be released a new GA version. Everyone knows migration costs are high. So we should know how to choose the JDK version. Here I summarize a few points:

  • For business costs and software protocols, try to use OpenJDK. There are many excellent OpenJDK out there, and we are using AWS Corretto.
  • Use the LTS version as much as possible. In fact, not only all JDK software should use the long term support version as much as possible.
  • Try not to blindly upgrade the JDK on an old project unless you have the time and energy to do so.

4. To summarize

Today we have a brief introduction to the release of Java14 and some suggestions for upgrading the JDK. I personally don’t think it is necessary to upgrade. Do not know schoolmates have what view, can leave a message to discuss