Java 14 Preview features
Answered
Hello,
How do I enable the following preview features using mac open jdk Java 14?
- 1. JEP 305 : Pattern Matching (Preview Feature in JDK14)
- 2. JEP 358: Helpful NullPointerExceptions
- 3. JEP 359: Records (Preview Feature in JDK14)
- 4. JEP 361: Switch Expressions (Standard)
- 5. JEP 368: Text Blocks (Second Preview)
- 6. JEP 360: Sealed Types (Preview)
I'm using version:
IntelliJ IDEA 2021.2.2 (Ultimate Edition)
Build #IU-212.5284.40, built on September 14, 2021
Runtime version: 11.0.12+7-b1504.28 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 11.6
GC: G1 Young Generation, G1 Old Generation
Please sign in to leave a comment.
These features are no longer in preview as there is a final JDK version available with these features, please check these links:
https://www.jetbrains.com/help/idea/project-settings-and-structure.html#preview-policy
https://youtrack.jetbrains.com/issue/IDEA-245212
https://youtrack.jetbrains.com/issue/IDEA-277405
See also https://www.jetbrains.com/help/idea/supported-java-versions.html. If you really need to use the preview features of the older Java releases, you will have to use the older IDE version for that: https://www.jetbrains.com/idea/download/previous.html.