Eclipse启动错误:A Java Runtime Environment(JRE) or Java Development Kit(JDK) must be available……
确保Jdk,Jre都安装完成并且环境变量配置无误的情况下,自动Ecplise报错如下:
A Java Runtime Environment (JRE) or Java Development Kit(JDK)
must be available in order to run Eclipse. No Java virtualmachine
was found after searching the following locations:
D:\eclipse\jre\bin\javaw.exe
javaw.exe in your current PATH
解决办法:
打开Eclipse根目录eclipse.ini文件:
![](https://images2018.cnblogs.com/blog/1191440/201805/1191440-20180522165550905-2004766211.png)
1、查找 -vm 路径改成你本地的java bin地址(取绝对路径)
-vm
D:/Program Files/jdk1.8.0_77/bin/javaw.exe
D:/Program Files/jdk1.8.0_77/bin/javaw.exe
2、若没有-vm,则在最前面加上两行:
-vm
D:/Program Files/jdk1.8.0_77/bin/javaw.exe
(这个是你安装的javaw.exe的绝对路径)![](https://img2020.cnblogs.com/blog/387171/202004/387171-20200401224437272-439328584.png)