This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
In Netbeans 3.X I could right click on a package in the Files view and rebuild just that package. In Netbeans 4.0 there are no build related options in the right-click context menu when I select a package folder in the Files or Projects views. The Build menu in the Menubar does have a context sensetive item "Compile <File>", where <File> updates to show your current selection (this should be in the right click menu too, BTW) but this is only "Compile" not "Build" ie, there is no context sensetive option to clean then compile. This means if I have a package in my project where I have changed a class and I know other classes in the package need to be rebuilt to account for the changes (eg, because I'm getting NoSuchMethodErrors when I try to run the code) then there's no way I can find to rebuild just one package. The only option seens to be "Build->Clean and Build Main Project", but this is unacceptable because this project has 5000 source files and I shouldn't have to wait several minutes when I know which package I need to rebuild!
I could have sworn this was already filed, but I have looked up and down and cannot find the original. Anyway, it was suggested before (somewhere?) to make compile.single on a j2seproject do a clean on the file selection (s/\.java/.class/g) before running the compiler, which should be straightforward. The actual Ant code to do it (as a build.xml override) is in fact already known and I posted it somewhere as a tip, but I can't remember where now.
Note also that reporter is probably more interested in issue #36033 than the actual reported problem.
Hah, found it - on netcat in response to Bryan Boone, who apparently never filed an RFE for it, not sure why not. See URL.
The cleaning package before compiling it seems a good idea.
Possible release note, in case we do not get a chance to actually fix it for 4.1; easy workaround once you know how, see URL. Note that exact text of overridden Ant target will change a bit (be more complicated) if you use multiple source roots in 4.1. Will need to draft an actual release note item in case this is still open by 4.1 high-resistance mode.
Obviously not for 4.1.
*** Issue 50282 has been marked as a duplicate of this issue. ***
I think this was fixed in 6.0 along with other changes in compile-single, and dependency tracking? Anyway this is not too relevant in 6.5 with Compile on Save.