【问题标题】:Setting up an existing Eclipse IDE with JDK 1.6 [duplicate]使用 JDK 1.6 设置现有的 Eclipse IDE [重复]
【发布时间】:2013-08-12 16:17:36
【问题描述】:

我的电脑:Win 7 32 位,Eclipse Kepler

最初,我有 JDK 1.7 。然后,由于我的项目,我现在必须运行我刚刚安装的 jdk 1.6。文件名:“jdk-6u25-windows-i586.exe”。我运行它并将其安装在我的 G:// 驱动器中。现在,如何让我的 Eclipse IDE 运行该版本 (1.6) 的 jdk?

谢谢。

【问题讨论】:

    标签: eclipse java


    【解决方案1】:

    设置编译器

    Right click on your Project->Properties->Java Compiler->Select 1.6
    

    设置jre:

    Menu->Window->Preferences->Java->Installed JREs- > Add JDK6/jre and remove others.
    

    【讨论】:

    • 谢谢,再次检查,我的复选框,使用执行环境中的合规性,未选中。我未选中它,然后将编译器合规级别设置为 1.6。对吗?
    • @GaurangTandon 是的,没错!
    • 那么,In也必须设置jre吗??
    • @GaurangTandon 是的,如果您希望编译和执行环境都是 jave 版本 6
    • 所以,我在>Preferences->Java->Installed JREs- > 之后得到的是i41.tinypic.com/10zstxs_th.jpg
    【解决方案2】:
    Window -> Preferences-> Java-> Installed Jres -> Add 1.6 -> select
    

    将为您的 IDE 设置全局默认 JRE。

    如果你想在每个项目基础上设置它,你应该使用:

    Project Properties -> Preferences-> Java-> Installed Jres -> Add 1.6 -> select
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-11-23
      • 1970-01-01
      • 2013-07-29
      • 2010-11-28
      • 2013-03-18
      • 2015-04-18
      • 2014-01-23
      相关资源
      最近更新 更多