IntelliJ - 无法启动 - “JAVA_HOME没有指向有效的JVM安装” [英] IntelliJ - Can't start - "JAVA_HOME does not point to a valid JVM installation"

查看:11728
本文介绍了IntelliJ - 无法启动 - “JAVA_HOME没有指向有效的JVM安装”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于有关此问题的每个其他StackOverflow问题,



但是,文件路径确实存在:





在我的环境变量中,我已将 JAVA_HOME 设置到该位置:





我把它放在我的用户变量而不是系统中,反之亦然,并尝试将它放入两者中。它不适用于我原来的Java 7 JDK,所以我刚刚下载了Java 8 JDK并尝试了它 - 没有骰子。



我也重启了我的电脑,和CMD可以使用 java javac 完全没问题:





有关如何解决此问题的任何帮助?我的最后一招是卸载并重新安装IntelliJ,我可能不得不这样做。

解决方案

java javac 可执行文件正在使用 PATH 环境变量,而intelliJ正在使用 JAVA_HOME 变量。删除 JAVA_HOME 值中的其他引号。



这可能表明您的jdk安装目录的路径是在 PATH 中进行硬编码,而不是使用%JAVA_HOME%


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 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%.

这篇关于IntelliJ - 无法启动 - “JAVA_HOME没有指向有效的JVM安装”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆