IntelliJ - Cannot start - "JAVA_HOME does not indicate a valid JVM installation"

For every other question that Karu was asked about this, here , here and here , I took all the steps to solve this problem, and none of them worked.

When running the 64-bit version of IntelliJ IDEA on my 64-bit computer running Windows 7, the following error occurs:

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

Error launching IDEA

However, the file path exists:

Filepath screenshot

And in my environment variables, I set JAVA_HOME to this place:

Environment Variables

I bothered to put it in my user variables instead of System and vice versa, and tried to put it in both. It did not work with the Java 7 JDK, which I originally had, so I just downloaded the Java 8 JDK and tried it - without dice.

I also restarted my computer, and CMD can use java and javac without any problems at all:

enter image description here

Any help on how I could solve this problem? My last resort is to uninstall and reinstall IntelliJ, which I may have to do.

+12
source share
7 answers

The java and javac executables use the PATH environment variable, and intelliJ uses the JAVA_HOME variable. Remove the extra quotation marks in your JAVA_HOME value.

This may indicate that your path to the jdk installation directory is hard-coded in PATH , rather than using %JAVA_HOME% .

+12
source

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

Updating JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_91 fixes the problem.

+10
source

The problem will almost certainly be with quotes around your JAVA_HOME path. Remove them and see if this works. If not, I would only recommend installing your JDK installations under the root and without spaces in them. I tend to put them in C:\JDK\1.8.0_65 etc. It makes referencing them much easier, and you don’t have to worry about quotes to protect places like what you do with Program Files.

+3
source

I ran into the same problem. My mistake was that I walked the path to / bin / and set; eventually.

Correct - JAVA_HOME = C: \ Program Files \ Java \ jdk1.8.0_92

no / bin / no ';'

+1
source

Open the CMD window and enter:

 echo %JAVA_HOME% 

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

In my case, a space was omitted, which was not visible in the Envrironment Variables Window.

0
source

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

0
source

There were the same problems opening PHPSTORM from the command line. The solution was to download jdk version 8 x86 (32bit). Change the settings in the environment variables by setting the JAVA_HOME path in the user variables for ... in C: \ Program Files (x86) \ Java \ jdk1.8.0_221

0
source

All Articles