在 NetBeans 项目中更改 JRE [英] Change JRE in a NetBeans project

查看:25
本文介绍了在 NetBeans 项目中更改 JRE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用 JRE 1.4 环境的 NetBeans 项目,这意味着我不能使用泛型.

I have a NetBeans project which is using the JRE 1.4 environment which means I can't use generics.

如何将项目更改为使用 1.6(?),以便我可以使用泛型?

How can I change the project to use 1.6(?), so I can use generics?

推荐答案

  • 项目选项卡中,右键单击项目并选择属性.在 Library 类别中选择 Java Platform JDK 1.6.
  • 然后,在 Source 类别中选择 Source/Binary Format JDK6.
  • 这假设您安装了 JDK 1.6 并且 NetBeans 知道
  • JDK 1.6 必须被 NetBeans 称为 Java 平台.
  • 从菜单中选择菜单 ToolsJava Platform Manager.
  • 如果 JDK 1.6 不在列表中,您可以在那里添加.
    • In the Project tab, right-click on the project and select Properties. In the Library category select Java Platform JDK 1.6.
    • Then, in the Source category select Source/Binary Format JDK6.
    • This assumes that you installed JDK 1.6 and NetBeans knows about this.
    • JDK 1.6 must be known to NetBeans as a Java Platform.
    • From the menu select menu ToolsJava Platform Manager.
    • If JDK 1.6 is not in the list, you can add it there.
    • 这篇关于在 NetBeans 项目中更改 JRE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆