'Setting up JDK 10 in IntelliJ IDEA: the selected directory is not a valid home for JDK

Has someone tried setting up JDK 10 on IntelliJ in MacOS?

When trying to do so, I am getting message as "the selected directory is not a valid home for JDK".

I have installed JDK 10 provided by oracle for MacOS

JDK intallation path on my machine is /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home



Solution 1:[1]

Proper support for Java 10 requires IntelliJ IDEA 2018.x version. IntelliJ IDEA 2017.x versions may not detect Java installation path properly.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 CrazyCoder