eclipse启动报错: No Java virtual machine

scala-ide下载集成scala包的eclipse版本使用,启动时报错:

A java runtime environment (JRE) or java development kit (JDK) must be available in order to run Eclipse. No java virtual machine was found after searching in the folloiwng location: ........

后面发现是eclipse找不到启动需要的javaw.exe,需要在 eclipse.ini 文件中指定其所在目录(默认是重配置文件中获取,获取不到则在eclipse安装目录下找),在eclipse.ini文件中加入这两行,注意两点:

1、-vm ..需要放在 -vmargs 前;

2、第二行(C:/Program Files/Java/jdk1.8.0_131/bin)为你的机器jdk的实际安装的bin目录  

..

-vm  

C:/Program Files/Java/jdk1.8.0_131/bin  

-vmargs

..

 


 

参考:

 https://stackoverflow.com/questions/12129024/error-java-runtime-environment-jre-or-java-development-kit-must-be-available

http://nigelzeng.iteye.com/blog/1585399

posted @ 2018-05-23 20:19  heaventouch  阅读(645)  评论(0编辑  收藏  举报