解决方法:Eclipse is running in a JRE, but a JDK is required

安装maven的eclipse插件后报错:Eclipse is running in a JRE, but a JDK is required

解决方法是:

 

1. 找到$ECLIPSE_HOME/eclipse.ini并打开

大约为:

-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m

 

2. 找到位置

-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m

 

3. 在-vmargs 之前加入下面的行,变为:

-vm
C:\Program Files\Java\jdk1.6.0_20\bin\javaw

-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m

 

o

o

o

 

o

o

o

 

你可能感兴趣的:(eclipse,jdk,maven,C++,c)