简体   繁体   中英

Netbeans 7.1 Build Hell

Each time I try to build any netbeans project (Ubuntu 11.10), I get the following build failure:

   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?

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.

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.

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