`
gao234
  • 浏览: 32055 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

安装m2eclipse后,在打开Eclipse的时候出现警告

阅读更多

在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)set your JDK as a default Java environment in eclipse (default installed JRE)

Open eclipse. Click on ‘Window’ -> ‘Preferences’ -> ‘Java’ -> ‘Installed JREs’.

If you can’t find any JDK on the list -> click ‘Add’ -> ‘Standard VM’ -> set all paths and click ‘Finish’.

After that – check this JDK on the list of installed JREs and click ‘OK’.

(2)add path to your SDK in eclipse.ini

open ‘eclipse.ini’ and add there: -vm path_to_javaw_on_your_machine,so in my example it will be (jdk1.6.0_17 on Windows):

-vm
D:\\Java\jdk1.6.0_13\jre\bin\javaw

Notice 1: Do not use paths with spaces! Replace all dir names with spaces to their shortcuts. For example: ‘Program Files’ is ‘Progra~1′ or 'Program Files (x86)' is 'Progra~2'.
Notice 2: ‘-vm’ is in the first line, path is in the second line

your ‘eclipse.ini’ looks like this:

-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vm
D:\Java\jdk1.6.0_13\jre\bin\javaw
-vmargs
-Xms40m
-Xmx256m

Notice : ‘-vm’ must be above "-vmargs"

Restart eclipse and everything should be fine.

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics