EVALUATION
Looks like the creation of a JarFile would retain a lock to the file. I don't know whether that's the correct behaviour. Reassigning to the T&L team for further evaluation.
###@###.### 2004-05-06
While a jar file is opened, a file descriptor to the file is maintained,
so that the file does not have to be continually reopened.
This is important for good performance of the JVM.
Note that this is business as usual for Windows applications.
You cannot replace any supporting files in a Windows application that are in
use, by design. An operation like replacing a dll typically requires a reboot
on Windows. You can make an argument for both ways of doing things, but
Java certainly cannot change the way Windows works.
I will likely close this as Will Not Fix.
###@###.### 2004-05-06
The general problem of a program's supporting files being replaced is
a known problem. Windows chooses to lock such files, while Unix
permits it, at the cost of possibly causing JVM crashes when a zip
file being used is replaced unexpectedly.
The standard workaround, if you *really* want replaceability, is to
always make a defensive copy of the jar file containing the contents
you want before opening it. You might not want to pay the cost of
that, however. We are very unlikely to want to copy rt.jar every time
`java' is invoked.
###@###.### 2004-05-11
5098318 also has to make sure sure JCE tries to clean up everything to allow for
GC'ing/unloading correctly. Having a close() would make things easier.
###@###.### 2005-05-26 00:22:38 GMT
###@###.### 2005-05-26 00:52:07 GMT
|