当前位置: 代码迷 >> Eclipse >> maven插件有关问题 - Eclipse is running in a JRE, but a JDK is required异常的解决
  详细解决方案

maven插件有关问题 - Eclipse is running in a JRE, but a JDK is required异常的解决

热度:505   发布时间:2016-04-23 01:19:44.0
maven插件问题 ----- Eclipse is running in a JRE, but a JDK is required错误的解决
Eclipse安装了Maven插件后,可能会报这种错误:

控制台出现:

   1. Eclipse is running in a JRE, but a JDK is required 
   2.   Some Maven plugins may not work when importing projects or updating source folders. 

Eclipse is running in a JRE, but a JDK is required
  Some Maven plugins may not work when importing projects or updating source folders.

这是因为在Eclipse.ini配置中没有指定-vm参数,修改如下重启Eclipse问题就解决了:


1. 检查Eclipse正在使用的JRE

‘Window’ -> ‘Preferences’ -> ‘Java’ -> ‘Installed JREs’ 确定正在使用JDK而非JRE.

2. 配置Eclipse.ini


-vm  
C:\Program Files\Java\jdk1.7.0_15\bin\javaw.exe  

-startupplugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar--launcher.libraryplugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120913-144807-productorg.eclipse.epp.package.jee.product--launcher.defaultActionopenFile--launcher.XXMaxPermSize256M-showsplashorg.eclipse.platform--launcher.XXMaxPermSize256m--launcher.defaultActionopenFile------------------vmC:\Program Files\Java\jdk1.7.0_15\bin\javaw.exe------------------vmargs-Dosgi.requiredJavaVersion=1.5-Dhelp.lucene.tokenizer=standard-Xms40m-Xmx512m




注意位置



http://liguoliang.com/2010/eclipse-is-running-in-a-jre-but-a-jdk-is-required/

http://xucons.iteye.com/blog/475204
  相关解决方案