如何在eclipse的配置文件里指定jdk路径(即配置启动eclipse的JDK)

如何在eclipse的配置文件里指定jdk路径(即配置启动eclipse的JDK)

2017年01月25日 03:26:08 阅读数:21751 标签: eclipsejdk 更多

个人分类: eclipse

版权声明:本文为Fighter168原创文章,未经允许不得转载。 https://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

原文:https://blog.csdn.net/fighterandknight/article/details/54727987

猜你喜欢

转载自blog.csdn.net/xuheng8600/article/details/82344080