参考转自:http://blog.csdn.net/fighterandknight/article/details/54727987
运行eclipse时报如下错误:
错误一:
错误二:
a java runtime environment(JRE) or java development kit(JDK) must be…
在eclipse的配置文件里指定jdk路径,只需在eclipse的配置文件里增加-vm参数即可。
打开eclipse目录下的eclipse.ini配置文件,增加-vm配置,需要注意的是该参数要加在-vmargs之前
eclipse.ini配置文件:
-startup
plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
–launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.401.v20161122-1740
-product
org.eclipse.epp.package.jee.product
–launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
–launcher.defaultAction
openFile
–launcher.appendVmargs
-vm
D:/Program Files/Java/jdk1.8.0_121/jre/bin/server/jvm.dll
-vmargs
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m