ubuntu linux下解决“no java virtual machine was found after searching the following locations:”的方法

现象:删除旧的jdk,安装新的jdk之后,打开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 the following locations:
/java/eclipse/jre/bin/java
java in your current PATH

报错截图:

解决办法:

在打开终端,进入Eclipse的目录,输入“ln -s java的安装目录/jre jre”

我的jdk的路径为:“/java/jdk1.8”

在打开终端,进入Eclipse的目录,输入“ln -s /java/jdk1.8/jre jre”

 

posted @ 2018-11-14 21:00  程序咖啡  阅读(4095)  评论(0编辑  收藏  举报