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  

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120913-144807
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-----------------
-vm
C:\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

你可能感兴趣的:(eclipse)