Eclipse解决方案之"Eclipse is running in a JRE, but a JDK is required"

Open the eclipse folder and edit the eclipse.ini file:
 
Please check if the file has the -vm parameter, if not, then add it.
 
-vm
C:\Program Files\Java\jdk1.6.0_10\bin\javaw.exe
 
Note: It should be add before the -vmargs parameter.
 
See my eclipse.ini, just like the following:
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
–launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813
-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 (x86)\Java\jdk1.6.0_17\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms40m
-Xmx512m

Please pay attention to the bold and red characters. 

I hope it will be helpful to you! Enjoy it!

posted @ 2015-10-05 22:18  alicus890824  阅读(137)  评论(0编辑  收藏  举报