The solution for "Eclipse is running in a JRE, but a JDK is required"

Open the eclipse folder and access the eclipse.ini file:
 
Before change it ,you will find it don’t have the -vm parameter,so add it.
 
vm
C:\Program Files\Java\jdk1.6.0_10\bin\javaw.exe( It can be changed as your jdk path )
 
Note: It should be add before the -vmargs parameter.
 
See my eclipse.ini, just like this:
 1 -startup
 2 plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
 3 –launcher.library
 4 plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813
 5 -product
 6 org.eclipse.epp.package.jee.product
 7 –launcher.defaultAction
 8 openFile
 9 –launcher.XXMaxPermSize
10 256M
11 -showsplash
12 org.eclipse.platform
13 –launcher.XXMaxPermSize
14 256m
15 –launcher.defaultAction
16 openFile
17 -vm
18 C:\Program Files (x86)\Java\jdk1.6.0_17\bin\javaw.exe
19 -vmargs
20 -Dosgi.requiredJavaVersion=1.5
21 -Dhelp.lucene.tokenizer=standard
22 -Xms40m
23 -Xmx512m

Please pay attention to the bold characters. 

I Wish it will be helpful to you!

Enjoy it!
 
posted @ 2013-10-07 15:11  Be here with you!  阅读(202)  评论(0编辑  收藏  举报