现象:删除旧的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”