RFR: 8233674: JarURLConnection.getJarFile throws Exception if some process is holding the file
alanb at openjdk.java.net
Fri Sep 17 10:30:41 UTC 2021
On Fri, 17 Sep 2021 08:46:52 GMT, Masanori Yano <myano at openjdk.org> wrote:
> Thank you for your comment. According to Microsoft KB316609, CreateFile() should be tried again a short time later. I think JarURLConnection should also be retried when antivirus software holds some files.
This seems to be just general advice about dealing with sharing violations. I think it would be useful to hear from the Microsoft folks on whether every application on Windows is expected to retry to workaround interference from virus checkers or whether this is something that should be fixed by the virus checker vendors. If the JDK ends up putting in a workaround then it will require more broader changes, things will work inconsistently if limited to opening zip files and java.io.
More information about the core-libs-dev