Good day I want to test Java 21 in IntelliJ Idea B...
# getting-started
l
Good day I want to test Java 21 in IntelliJ Idea But even when I change SDK version of my project to JDK 21 (I installed it from Java website) I can't use new features How can I solve that?
s
in Project Structure you have to set not only the SKD to 21 but also adjust the Language Level to 21.
l
I need to choose Experimental?
image.png
k
You need IntelliJ Idea 2023.3 to fully support Java 21. That should be available in the near future. In the meantime, you need to use "experimental features" because IJ treats them as features of Java 21 which were experimental in Java 20, the latest supported version. Unless you want to try the 2023.3 EAP release.
l
Like that?
s
looks good, try it out.