JDK-4375349 : DownloadService does not remove on windows
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: jaws-0.9-ea
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2000-09-30
  • Updated: 2002-02-26
  • Resolved: 2002-02-26
Related Reports
Duplicate :  
Description
A program trying to delete a JAR file that has been used or is in
use by itself fails on Windows - due to a sharing violation. This
works on Solaris/Linux due to different semantics of file delete.

This windows version should write a marker so the file will be deleted
later, e.g., we should record that there are pending deletes.
 

Comments
EVALUATION This might be a difficult bug to fix. Due to Windows file sharing semantics, we can't delete a file on Windows if it's open by any process. Making a list of files we failed to delete and then deleting this list after we close the files, won't work because an app can call System.exit() at any time and we have no way to hook into that. To make this work, as suggested by Rene, we would need to tag files for deletion during 1 run then actually delete the files the next time JavaWS starts. At this point we STILL have no guarantee that the files will be deleted - they may still be held open by another JavaWS process. This could be a relatively large somewhat risky fix so I'm not sure yet if we should fix this for FCS. -stephen.bohne@East 2000-10-24 This should be fixed as part of RFE 4353301: Cache management rene.schmidt@eng 2001-02-27 This is part of a major cache and cache management re-write that is postponed until after 1.0.1 andy.herrick@East 2001-04-08 The underlying problem is the same as in bug #4393792, and is fixed by the fix for that.
08-04-2001