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 Files\Java\jdk1.8.0_74")
does not point to a valid JVM installation.
However, the file path does exist:
And in my Environment Variables, I have set JAVA_HOME
to that location:
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:
Any help on how I could resolve this? My last resort is uninstalling and reinstalling IntelliJ, which I may have to do.
The environment variable JAVA_HOME does not point to a valid JVM installation. JAVA_HOME should be set to the root of your Java installation. or add this value to the system environment variables. See What are PATH and other environment variables, and how can I set or use them? for more information.
To set JAVA_HOME, do the following: Right click My Computer and select Properties. On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.
Verify JAVA_HOME Enter the command echo %JAVA_HOME% . This should output the path to your Java installation folder. If it doesn't, your JAVA_HOME variable was not set correctly. Please make sure you're using the correct Java installation folder, or repeat the steps above.
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.
The java
and javac
executables are using the PATH
environment variable, while intelliJ is using JAVA_HOME
variable. Remove the additional quotation marks in your JAVA_HOME
value.
It might shows that your path to the jdk installation directory is hard coded in the PATH
, rather then using %JAVA_HOME%
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With