您的位置:首页 > 编程语言 > Java开发

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

2019-04-23 20:22 471 查看
               

参考转自: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


           
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: