简体   繁体   English

Netbeans 7.1构建地狱

[英]Netbeans 7.1 Build Hell

Each time I try to build any netbeans project (Ubuntu 11.10), I get the following build failure: 每次尝试构建任何 netbeans项目(Ubuntu 11.10)时,都会遇到以下构建失败:

   annotations are not supported in -source 1.3
   (use -source 5 or higher to enable annotations)

Not sure what I did to cause this to happen, as I was building fine moments before. 不确定我做了什么导致这种情况发生,因为我之前的工作很顺利。 Now, I can't build anything. 现在,我什么都做不了。

I only have JDK 6 installed -- where is the source switch being set and how can I unset it? 我只安装了JDK 6,在哪里设置了源开关,如何取消设置它?

Right click on your project, and select project properties; 右键单击您的项目,然后选择项目属性; the first item on the left is should be Sources -- make sure its selected. 左侧的第一项应该是“来源”-确保选中它。 Look towards the bottom on the right side at Source/Binary Format. 在“源/二进制格式”的右侧底部查看。 It should be set to JDK 6. If not, change it. 应该将其设置为JDK6。否则,请进行更改。

Next, go to libraries (right below Sources on the left). 接下来,转到库(在左侧“源”下面)。 The top entry on the right side, Java Platform, should be set to something like "JDK 1.6 (Default)" If its not, then try to change it in the combo box, if there are no other options, choose manage platforms to configure Netbeans to use the correct JDK. 右侧顶部的Java平台条目应设置为类似“ JDK 1.6(默认)”的名称,如果没有,请尝试在组合框中进行更改,如果没有其他选项,请选择“管理平台”进行配置Netbeans使用正确的JDK。

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

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