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.
Here's how to repeat: 1) introduce an error into any java file 2) compile, it will show you the error 3) fix the error, save 4) go to root project node, select 'build project' You get this error: ------------------------------------ com/cboe/copp/meter/CountMeter.java [13:1] error while writing com.cboe.copp.meter.CountMeter: Y:\Copp\java\com\cboe\copp\meter\CountMeter.class (Access is denied) public class CountMeter implements Meter ^ 1 error Errors compiling Project Copp Task Infra. ------------------------------------ The file is now locked and is not deletable from windows or anywhere else. The file will remain locked until the IDE's next GC. (Use the GC button on the memory toolbar to cause GC... the file is now unlocked)
in the example error message, the file that I had originally compiled with the rerror was "CountMeter.java" Note: the class file associated with the file with the previous error is the one that remains locked
Not a solution maybe. I remember problems like these. It occurs ONLY on Win platform. In ant build scripts the solution was to fork the java compiler task into a different JVM. Or to restart IDE...
Uff, I've found reproducible testcase! Just set "internal campilation" to be the default compiler and set it's Target property. And then invoke Build All.
Created attachment 8690 [details] Stack Trace
Can you reproduce it for an external compiler, too ?
No, I'm afraid.
Problem is in clazz module. The important part of testcase is that this bug occurs with cross-compilation. Thanks Jan for finding it!
Fixed in trunk. Input streams, used for reading class files, are now closed.
*** Issue 29622 has been marked as a duplicate of this issue. ***
*** Issue 27383 has been marked as a duplicate of this issue. ***
Verified in trunk