Search code examples
javaintellij-idea

IntelliJ - java: Cannot find JDK '1.8'


Update: Not sure why this is marked as a duplicate. I had already linked to the other post stating that none of the suggestions / answers work for me. In addition, their question seems to be related to an issue using Windows VMs via Mac, which is irrelevant for me.

I am using IntelliJ IDEA 14.0.3. I have selected the 'Java Hello World' sample. When I try and run the program I receive the error: "Error: java: Cannot find JDK '1.8' for module 'Deliverable4'. I have tried every single suggestion from this post intellij - java: Cannot find JDK '1.7' for module but still can't this to work. Any help would be greatly appreciated.


Solution

  • Go to:

    File => Project structure

    And check: Project, Modules and SDKs tabs:

    enter image description here

    If at SDKs Java 1.8 Sdk isn't selected just add it.

    And press OK.