在eclipse中安装了m2eclipse(maven插件)
在安装后,出现下列警告:
The Maven Integration requires that Eclipse be running in a JDK, because a number of Maven core plugins are using jars from the JDK.
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.
解决方法:
1、检查Preferences->Java->Installed JREs里是否已添加正确的JRE配置,如果没有请添加正确。
2、在Eclipse启动配置文件eclipse.ini(此文件位于Eclipse安装目录里)里添加启动参数,将JDK里的javaw.exe路径指定进来:
-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
D:\Program Files\Java\jdk1.6.0_21\bin\javaw
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
使用参数-vm来指定JDK路径,将下面的javaw所处位置修改为你自己的即可。
注意:-vm参数必须位置-vmargs参数之前。