IntelliJ IDEA adding JDK 10: “The selected directory is not a valid home for JDK” : <p>I'm creating this question only because the duplicate questions I found were marked with <a href="https://stackoverflow.com/questions/21713414/intellij-idea-the-selected-directory-is-not-a-valid-home-for-jdk">Windows</a> and <a href="https://stackoverflow.com/questions/30116439/selected-directory-is-not-a-valid-home-for-jdk-intellij-idea-on-ubuntu/30116654">Ubuntu</a> respectively, whereas I am experiencing this issue on macOS</p>

<p>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 <code>/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home</code> as a new JDK to IntelliJ, I got the error message</p>

<blockquote>
  <p>The selected directory is not a valid home for JDK</p>
</blockquote>

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