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.

Bug 30290 - NB is holding a .class file hostage (not allowing delete or recompile)
Summary: NB is holding a .class file hostage (not allowing delete or recompile)
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows 3.1/NT
: P2 blocker (vote)
Assignee: Tomas Hurka
URL:
Keywords:
: 27383 29622 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-01-22 21:17 UTC by Lee Doty
Modified: 2003-02-27 09:20 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stack Trace (1.17 KB, text/plain)
2003-01-28 08:03 UTC, Jan Becicka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lee Doty 2003-01-22 21:17:45 UTC
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)
Comment 1 Lee Doty 2003-01-22 21:19:51 UTC
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
Comment 2 dronski 2003-01-23 19:48:45 UTC
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...
Comment 3 Jan Becicka 2003-01-28 08:02:36 UTC
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.
Comment 4 Jan Becicka 2003-01-28 08:03:58 UTC
Created attachment 8690 [details]
Stack Trace
Comment 5 Svata Dedic 2003-01-28 08:05:03 UTC
Can you reproduce it for an external compiler, too ?
Comment 6 Jan Becicka 2003-01-28 08:15:06 UTC
No, I'm afraid.
Comment 7 Tomas Hurka 2003-01-29 15:27:13 UTC
Problem is in clazz module. The important part of testcase is that this bug occurs with cross-compilation. Thanks Jan for finding it!
Comment 8 Tomas Hurka 2003-01-29 15:33:34 UTC
Fixed in trunk. Input streams, used for reading class files, are now closed. 
Comment 9 Tomas Hurka 2003-01-31 17:07:24 UTC
*** Issue 29622 has been marked as a duplicate of this issue. ***
Comment 10 Tomas Hurka 2003-02-04 09:56:30 UTC
*** Issue 27383 has been marked as a duplicate of this issue. ***
Comment 11 Jan Becicka 2003-02-27 09:20:11 UTC
Verified in trunk