JDK-4991099 : Applications need a way to close jar files opened by java.net.URLClassLoader and
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 1.4.2_04
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2004-02-09
  • Updated: 2004-03-09
  • Resolved: 2004-03-09
Related Reports
Duplicate :  
Description
In particular, this happens as Introspector obtains bean info when a jar file appears in the classpath.  This is a problem in long-running applications that need to be able to deal with newly-available versions of a previously-opened jar file.  This is especially an issue on Windows systems on which the open jars cannot be overwritten by newer versions.

In this scenario, for example, Introspector delegates to java.net.URLClassLoader which delegates to sun.misc.URLClassPath and its inner class JarLoader.  The jar file is opened but never closed.  Attempts from other processes to deposit an updated version of the jar file fail (on Windows) because the OS does not allow the open file to be overwritten.
###@###.### 2004-02-09
###@###.### 2004-02-09