简体   繁体   中英

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.

May i know how i can modify eclipse ini or environment home to use my other 1.6 installation?

Please try the eclipse.ini entry above the varargs (the following two lines must be two lines in the eclipse.ini file)

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

Find the JVM

Right click the project in Package Explorer -> Configure Build Path

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

Add Library -> JRE System Library

添加库 -> JRE 系统库

Set JRE system library to JDK

将 JRE 系统库设置为 JDK

Verify JDK is the reference library

验证 JDK 是参考库

From the menu in the top.. Proceed as follows--

Project-->Properties--> Java Build Path--> Libraries--> JRE System Library.

Now click Edit . Select Alternate JRE. Click Installed JRE. Provide path to your other JDK. Then FINISH.

That's it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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