如何解决It's likely you're attempting to run Eclipse using the JRE instead of the JDK
2017-09-27 00:08
1061 查看
最近为了维护一个老项目,需要用到一个插件,在安装插件后运行该插件出现eclipse如下报错
It's likely you're attempting to run Eclipse using the JRE instead of the JDK.
具体原因是因为系统安装了最新的JDK1.8,可能JDK1.8对应的JRE有些东西改变了,JDK1.7时没遇到过这种问题。
解决方案一(成功解决问题):
启动eclipse时设置vm参数为javaw(java的窗口运行环境)
eclipse.exe -vm "c:\Program Files\Java\jdk1.8.0_60\bin\javaw.exe"
然后点击eclipse快捷方式启动即可
解决方案二
1. 配置环境变量(windows系统示例)
设置JAVA_HOME变量
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_101
设置PATH变量
PATH=%JAVA_HOME%\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
这里必须注意 JAVA_HOME的路径必须在SystemRoot路径之前,否则会出现运行报错
总结
本人最终选择第一种方案,使用eclipse快捷方式添加启动参数,避免更改windows环境变量引起其他问题。当然后来查看以后发现早已经添加了JAVA_HOME环境变量,只是在设置PATH时JAVA_HOME没有放在SystemRoot路径之前。
It's likely you're attempting to run Eclipse using the JRE instead of the JDK.
具体原因是因为系统安装了最新的JDK1.8,可能JDK1.8对应的JRE有些东西改变了,JDK1.7时没遇到过这种问题。
解决方案一(成功解决问题):
启动eclipse时设置vm参数为javaw(java的窗口运行环境)
eclipse.exe -vm "c:\Program Files\Java\jdk1.8.0_60\bin\javaw.exe"
然后点击eclipse快捷方式启动即可
解决方案二
1. 配置环境变量(windows系统示例)
设置JAVA_HOME变量
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_101
设置PATH变量
PATH=%JAVA_HOME%\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
这里必须注意 JAVA_HOME的路径必须在SystemRoot路径之前,否则会出现运行报错
总结
本人最终选择第一种方案,使用eclipse快捷方式添加启动参数,避免更改windows环境变量引起其他问题。当然后来查看以后发现早已经添加了JAVA_HOME环境变量,只是在设置PATH时JAVA_HOME没有放在SystemRoot路径之前。
相关文章推荐
- attempting to bokeyaunrun eclipse useing the jre instead of jdk,to run eclipse using
- You're given a string of lower-case Latin letters. Your task is to find the length of its longest su
- 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:…
- Eclipse打war包(maven项目)错误To see the full stack trace of the errors, re-run Maven with the -e switch
- Are you looking for a way to get the entire text of a word document into a RichEdit without using the Clipboard?
- 关于sonar问题解决Re-run SonarQube Scanner using the -X switch to enable full debug logging non-zero code:1
- Eclipse打war包(maven项目)错误To see the full stack trace of the errors, re-run Maven with the -e switch
- Please make sure the -vm option in eclipse.ini is pointing to a JDK and verify that Installed JRE’s are also using JDK installs
- It is not possible to run two different versions of ASP.NET in the same IIS process.问题的解决
- 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: /usr/local/eclipse/
- VC6编辑时提示This file has been modified outside of the source of editor.Do you want to reload it?解决方法
- android NDK如何解决Please define the NDK_PROJECT_PATH variable to point to it
- 普通用户操作tomcat项目时报:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable is needed to run this program
- Please make sure the -vm option in eclipse.ini is pointing to a JDK and verify that Installed JRE’s
- Please read “Security” section of the manual to find out how to run mysqld as root!错误解决(转)
- You are attempting to build with the incorrect version of java.
- 'You are trying to run the Python 2 version of Beautiful Soup under Python 3. This will not work.'<>
- The Constructor Date(String) is Deprecated since of JDK 1.1 you should not use it
- The Eclipse executable launcher was unable to locate its companion launcher jar的解决方法
- 如何解决flash跑到层上面的问题?How to resolve the div layer appear over the top of flash?