简体   繁体   English

指向 Eclipse IDE 以使用 JAVA_HOME 中指定的 JRE/JDK 以外的另一个 JRE/JDK

[英]Point eclipse IDE to use another JRE / JDK other than one specified in JAVA_HOME

I am having two JRE / SDK in my development environment, however it was necessary in my situation to set JAVA_HOME to 1.4.2, this is causing my eclipse IDE to stop running as it required 1.6 and above.我的开发环境中有两个 JRE/SDK,但是在我的情况下有必要将 JAVA_HOME 设置为 1.4.2,这导致我的 Eclipse IDE 停止运行,因为它需要 1.6 及更高版本。

May i know how i can modify eclipse ini or environment home to use my other 1.6 installation?我可以知道如何修改 eclipse ini 或 environment home 以使用我的其他 1.6 安装吗?

Please try the eclipse.ini entry above the varargs (the following two lines must be two lines in the eclipse.ini file)请尝试varargs上面的eclipse.ini条目(下面两行必须eclipse.ini文件中的两行)

-vm
C:\Java\JDK\1.5\bin\javaw.exe

Find the JVM找到 JVM

Right click the project in Package Explorer -> Configure Build Path在 Package Explorer 中右键单击项目 -> 配置构建路径

在 Package Explorer 中右键单击项目 -> 配置构建路径

Add Library -> JRE System Library添加库 -> JRE 系统库

添加库 -> JRE 系统库

Set JRE system library to JDK将 JRE 系统库设置为 JDK

将 JRE 系统库设置为 JDK

Verify JDK is the reference library验证 JDK 是参考库

验证 JDK 是参考库

From the menu in the top.. Proceed as follows--从顶部的菜单.. 继续如下——

Project-->Properties--> Java Build Path--> Libraries--> JRE System Library.项目-->属性-->Java构建路径-->库-->JRE系统库。

Now click Edit .现在点击 编辑 。 Select Alternate JRE.选择备用 JRE。 Click Installed JRE.单击已安装的 JRE。 Provide path to your other JDK.提供其他 JDK 的路径。 Then FINISH.然后完成。

That's it.而已。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM