Friday, April 26, 2024

Cannot find JDK classes in '/Library/Java/JavaVirtualMachines/temurin-1

 My micro service upgraded from JDk11 to JDK17. I installed JDK17 ( Both OpenJDK and temurin-17.0.11) in Mac. When I use "Add JDK" in intelliJ it gives me error "Cannot find JDK classes in '/Library/Java/JavaVirtualMachines/temurin-1"


Expectation was JDK should be added successfully


Solution

Go to File > New > Project....

Select Java on the left side, and choose Java SDK 17 as the Project SDK.

Choose the desired project template and settings.

Click Next and follow the wizard to configure your project details.

Click Finish to create the project.


For more details please look https://medium.com/@saijyotshna1999/title-setting-up-java-17-in-intellij-idea-3330b12625d5