Using JDK21 Preview Features and/or incubator classes

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • Onboard AI - Learn any GitHub repo in 59 seconds
  • InfluxDB - Collect and Analyze Billions of Data Points in Real Time
  • SaaSHub - Software Alternatives and Reviews
  • jdk21

    JDK 21 Test repo

    A full working example which obviously requires JDK21 most recent EA build can be found here.

  • maven-compiler-plugin

    Apache Maven Compiler Plugin

    The configuration enablePreview exists since version 3.10.1 of the Maven Compiler Plugin. So in general I recommend to use the most recent versions of the plugins otherwise it might happen that some configuration options or alike might not exist at all or special things for newer JDK versions.

  • Onboard AI

    Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.

  • maven-mvnd

    Apache Maven Daemon

    So how can you configure your Maven build to support such a play lesson? It's easier than you think. Let's start the configuration. My assumption is that you would like to play around with a preview features of JDK21 for example String Templates (JEP430). I just selected this JEP for demonstration. You can select whatever JEP in preview.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts