IntelliJ IDEA adding JDK 10: “The selected directory is not a valid home for JDK”

12,631

It turned out that upgrading to the newest IntelliJ IDEA version was (for some reason) what was required. After installing IDEA 2018.1, I was able to add JDK 10 without issue.

Share:
12,631

Related videos on Youtube

Anders Rabo Thorbeck
Author by

Anders Rabo Thorbeck

Updated on June 04, 2022

Comments

  • Anders Rabo Thorbeck
    Anders Rabo Thorbeck almost 2 years

    I'm creating this question only because the duplicate questions I found were marked with Windows and Ubuntu respectively, whereas I am experiencing this issue on macOS

    I have IntelliJ Ultimate 2017.2 installed, with JDK 8 added, and want to add JDK 10. After downloading and installing Oracle's JDK 10, and attempting to add /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home as a new JDK to IntelliJ, I got the error message

    The selected directory is not a valid home for JDK

    despite the fact that the path and file permissions of this JDK 10 directory were seemingly all aligned with the JDK 8 ones.

  • GhostCat
    GhostCat almost 6 years
    Which is like the first thought after reading the question title :-)
  • RestInPeace
    RestInPeace almost 6 years
    But after upgrading to Intellij IDEA 2018, I'm encountering at least four different types of bugs that severely affect my productivity, none of which existed in the 2017 version.
  • Zarathustra
    Zarathustra over 5 years
    does not work for me with IDEA 2018.2 for java 10 and 11 :/
  • Gabe Vacaliuc
    Gabe Vacaliuc over 5 years
    @Zarathustra were you able to get Java 10 to work with IDEA 2018.2?
  • Zarathustra
    Zarathustra over 5 years
    @Gabe Vacaliuc downloading it from openjdk directly instead of via apt / yum