IntelliJ - Can't start - “JAVA_HOME does not point to a valid JVM installation”

后端 未结 9 1998
情歌与酒
情歌与酒 2021-01-08 00:48

For every other StackOverflow question that\'s been asked about this, here, here, and here, I\'ve followed all the steps to resolve this issue, and none have worked.

相关标签:
9条回答
  • 2021-01-08 01:10

    The problem will almost certainly be with the quotation marks around your JAVA_HOME path. Remove those and see if it works. If not, then I would recommend only putting your JDK installations under the root and with no spaces in them. I tend to put them in C:\JDK\1.8.0_65, etc. It makes referencing them far easier and you don't have to worry about quotation marks to protect spaces like you do with "Program Files".

    0 讨论(0)
  • 2021-01-08 01:14

    Open a CMD window, and enter:

    echo %JAVA_HOME%
    

    Verify the result is indeed the path entered your JAVA_HOME variable, i.e. C:\Program Files\Java\jdk1.8.0_74.

    In my case, a space was slipped in, that was not visible in the Envrironment Variables window.

    0 讨论(0)
  • 2021-01-08 01:16

    You can also change the installation of OpenJDK (if you still have the installer packages) and add the JAVA_HOME variable (you have to enable it), afterwards just click through the installation until it is finished.

    0 讨论(0)
  • 2021-01-08 01:18

    The problem I had seemed to be due to attempting to launch idea.exe rather than idea64.exe - when I moved to the 64 one then it worked.

    0 讨论(0)
  • 2021-01-08 01:20

    In my case, the issue was that JAVA_HOME was pointing to a path upto /bin folder (C:\Program Files (x86)\Java\jdk1.8.0_91\bin\) - while Eclipse accepts this, IntelliJ does not.

    Updating to JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_91 resolved the issue.

    0 讨论(0)
  • 2021-01-08 01:22

    My problem was adding 2 path in JAVA_HOME variable (I had added x64 jdk path with x86 jdk and my android studio needed just the x86 one. I deleted the x64 path and it has just worked :)

    0 讨论(0)
提交回复
热议问题