Eclipse is running in a JRE, but a JDK is requi...

华宰 发布于 2011/03/19 12:13
阅读 272
收藏 1

对于m2eclipse的插件,需要eclipse运行于jdk而不是jre,

打开eclipse,看到错误

Eclipse is running in a JRE, but a JDK is required

解决方法:

在eclipse目录下eclipse.ini,添加如下两行,注意这行要加在-vmargs之前,

-vm
C:\Program Files\Java\jdk1.5.0_16\bin\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
C:\Program Files\Java\jdk1.5.0_16\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m

加载中
返回顶部
顶部