Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 773
ericdemo07 Avatar asked May 22 '18 15:05

ericdemo07


People also ask

How do I fix the selected directory is not a valid home for JDK?

First at all, you need to select the C:\ folder. Then, you select Program Files. After it, you select java, and finally the jdk you downloaded.

Where is a valid home for JDK?

Set JAVA_HOME: Right click My Computer and select Properties. On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1. 6.0_02.

How do I point to JDK in IntelliJ?

From the main menu, select File | Project Structure | Project Settings | Project. If the necessary JDK is already defined in IntelliJ IDEA, select it from the SDK list.

Where is JDK version in IntelliJ?

IntelliJ stores the JDK version used by the project within its Project Structure. There are two ways to locate this: Via menu navigation: Navigating to File -> Project Structure.


1 Answers

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

like image 155
CrazyCoder Avatar answered Oct 04 '22 13:10

CrazyCoder