首页

关于eclipse没有JAVA_HOME环境或ecipse.ini的VM配置导致启动报"A Java Runtime Environment (JRE) or Java Development Kit (JDK) ..JAVA_HOME.."

标签:eclipse,JAVA_HOME,java环境.ini,VM配置,ide配置JRE     发布时间:2018-07-27   

一、前言

关于打开ecipse ide开发环境因没有配置JAVA_HOME环境变量或eclipse.ini的配置文件,导致报”A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse.  No Java virtual machine E:\nijun\eclipse3.4.1\eclipse\jre\bin\javaw.exe javaw.exe in your current PATH“界面如下图错误提示

关于eclipse没有JAVA_HOME环境或ecipse.ini的VM配置导致启动报"A Java Runtime Environment (JRE) or Java Development Kit  (JDK) ..JAVA_HOME.."

二、代码示例

1.原始eclipse.ini配置和下图

-startup@b@plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar@b@--launcher.library@b@plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.551.v20171108-1834@b@-product@b@org.eclipse.epp.package.jee.product@b@-showsplash@b@org.eclipse.epp.package.common@b@--launcher.defaultAction@b@openFile@b@--launcher.defaultAction@b@openFile@b@--launcher.appendVmargs@b@-vmargs@b@-Dosgi.requiredJavaVersion=1.8@b@-Dosgi.instance.area.default=@user.home/eclipse-workspace@b@-XX:+UseG1GC@b@-XX:+UseStringDeduplication@b@--add-modules=ALL-SYSTEM@b@-Dosgi.requiredJavaVersion=1.8@b@-Xms256m@b@-Xmx1024m@b@--add-modules=ALL-SYSTEM

修改变更如下图,后面再重启

-startup@b@plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar@b@--launcher.library@b@plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.551.v20171108-1834@b@-product@b@org.eclipse.epp.package.jee.product@b@-showsplash@b@org.eclipse.epp.package.common@b@--launcher.defaultAction@b@openFile@b@--launcher.defaultAction@b@openFile@b@--launcher.appendVmargs@b@-VM@b@D:/NIJUN/soft/jdk1.8.0_11/jre/bin/client/jvm.dll@b@-vmargs@b@-Dosgi.requiredJavaVersion=1.8@b@-Dosgi.instance.area.default=@user.home/eclipse-workspace@b@-XX:+UseG1GC@b@-XX:+UseStringDeduplication@b@--add-modules=ALL-SYSTEM@b@-Dosgi.requiredJavaVersion=1.8@b@-Xms256m@b@-Xmx1024m@b@--add-modules=ALL-SYSTEM

或参考其他配置模板

-startup@b@plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar@b@--launcher.library@b@plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503@b@-product@b@org.eclipse.epp.package.jee.product@b@--launcher.defaultAction@b@openFile@b@--launcher.XXMaxPermSize@b@256M@b@-showsplash@b@org.eclipse.platform@b@-vm@b@C:/xwood_net/applications/Java/jdk1.8.0_11/bin/javaw@b@--launcher.XXMaxPermSize@b@256m@b@--launcher.defaultAction@b@openFile@b@-vmargs@b@-Dosgi.requiredJavaVersion=1.5@b@-Xms40m@b@-Xmx512m
<<热门下载>>