Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
915 views
in Technique[技术] by (71.8m points)

java - IntelliJ - Can't start - "JAVA_HOME does not point to a valid JVM installation"

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.

When launching IntelliJ IDEA 64-bit on my 64-bit Windows 7 machine, I encounter the following error:

The environment variable JAVA_HOME (with the value of "C:Program FilesJavajdk1.8.0_74") 
does not point to a valid JVM installation.

Error launching IDEA

However, the file path does exist:

Filepath screenshot

And in my Environment Variables, I have set JAVA_HOME to that location:

Environment Variables

I've tinkered around with putting it in my User variables instead of the System and vice-versa, and tried putting it in both. It didn't work with the Java 7 JDK I had originally, so I just downloaded the Java 8 JDK and tried it - no dice.

I also restarted my computer, and CMD can use java and javac with no problem at all:

enter image description here

Any help on how I could resolve this? My last resort is uninstalling and reinstalling IntelliJ, which I may have to do.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...