简体   繁体   English

NetBeans 7.4可以将JDK 1.6作为默认平台吗?

[英]Can NetBeans 7.4 have JDK 1.6 as a default platform?

I am using Netbeans to work mostly on Java Core Applications that have been created and need to run on Java 6. I have Java 6, 7 and 8 installed on my machine and have them all available in NetBeans to configure my projects. 我正在使用Netbeans主要处理已经创建并需要在Java 6上运行的Java核心应用程序。我在我的机器上安装了Java 6,7和8,并且可以在NetBeans中使用它们来配置我的项目。

However, since NetBeans 7.4 only runs on Java 7+, Java 7 is selected as my default platform in NetBeans. 但是,由于NetBeans 7.4仅在Java 7+上运行,因此Java 7被选为NetBeans中的默认平台。 The usual way to change that would be to set 通常的改变方法是设置

netbeans_jdkhome=<my java 6 installation>

in netbeans.conf. 在netbeans.conf中。

However, this is the JDK NetBeans uses to run so i am at an impasse. 但是,这是JDK NetBeans用来运行所以我陷入了僵局。

The problem is: Our projects depend on a great many other projects sadly not using something like maven or similar, so when i do a "clean & build" in netbeans, even when i set the project's platform to "Java 1.6", all dependencies are compiled using "Java 1.7". 问题是:我们的项目依赖于许多其他项目,遗憾的是不使用maven或类似的东西,所以当我在netbeans中进行“清理和构建”时,即使我将项目的平台设置为“Java 1.6”,所有依赖项使用“Java 1.7”编译。

Is there any OTHER way to set the default platform for netbeans? 有没有其他方法来设置netbeans的默认平台? I would rather not switch back to NetBeans 7.3.1, since 7.4 fixes some bugs i was REALLY annoyed and slowed down by. 我宁愿不切换回NetBeans 7.3.1,因为7.4修复了一些我真的很恼火并且减速的错误。

I already asked the same question in NetBeans forums without any reaction, so please forgive me if you already have read it there. 我已经在NetBeans论坛中问了同样的问题而没有任何反应,所以如果你已经在那里阅读过,请原谅我。

Currently, apart from netbeans.conf you can only specify the Java Platform per project (Project Context Menu -> Properties -> Build -> Compile) and not per "Project Group" or NetBeans-wide. 目前,除了netbeans.conf之外,您只能为每个项目指定Java平台(项目上下文菜单 - >属性 - >构建 - >编译),而不是每个“项目组”或NetBeans范围。

Also see: https://netbeans.org/bugzilla/show_bug.cgi?id=234324 另请参阅: https//netbeans.org/bugzilla/show_bug.cgi?id = 234324

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

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