How to set IntelliJ IDEA Project SDK

JavaIntellij IdeaJava 8SdkJava 7

Java Problem Overview


I just installed IntelliJ IDEA and when I try to create my first Project it asks for me to set up the Project SDK. When I click on "JDK" it asks for me to select the home directory of the JDK as shown in this image.

enter image description here

I'm having trouble locating where it is.

Java Solutions


Solution 1 - Java

For a new project select the home directory of the jdk

eg C:\Java\jdk1.7.0_99 or C:\Program Files\Java\jdk1.7.0_99

For an existing project.

  1. You need to have a jdk installed on the system.

for instance in

C:\Java\jdk1.7.0_99

  1. go to project structure under File menu ctrl+alt+shift+S

  2. SDKs is located under Platform Settings. Select it.

  3. click the green + up the top of the window.

  4. select JDK (I have to use keyboard to select it do not know why).

select the home directory for your jdk installation.

should be good to go.

Solution 2 - Java

For IntelliJ IDEA 2017.2 I did the following to fix this issue: Go to your project structure enter image description here Now go to SDKs under platform settings and click the green add button. Add your JDK path. In my case it was this path C:\Program Files\Java\jdk1.8.0_144 enter image description here Now Just go Project under Project settings and select the project SDK. enter image description here

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser2419553View Question on Stackoverflow
Solution 1 - JavaBevynQView Answer on Stackoverflow
Solution 2 - JavaMelchiaView Answer on Stackoverflow