太久没有打开eclipse或者不小心点到jdk时,再次打开eclipse会出现以下错误时:

即:
A Java Runtime Environment (JRE) or Java Development Kit (JDK)must be available in order to run Eclipse. No Java virtual machinewas found after searching the following locations:
E:(eclipseeclipse-je-oxygen--win32-x86 64eclipse-jee-oxygen-R-win32-x86 64eclipsevrebin'javaw.exe
javaw.exe. in your current PATH
解决方法:
打开Eclipse根目录eclipse.ini文件:

打开在开头加上两行:
-vm
C:\Program Files\Java\jre1.8.0_202\bin\javaw.exe(这个是你安装jdk时的javaw.exe的绝对路径)

最后重新打开即可,,,,