Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8224794

ZipFile/JarFile should open zip/JAR file with FILE_SHARE_DELETE sharing mode on Windows

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Icon: P3 P3
    • None
    • None
    • core-libs

      It is common to encounter scenarios where someone attempts to delete a JAR file that is in use. This was a source of many reliability issues in the past, at least on Unix, when the CEN was mapped into memory. One remaining issue is specific to Windows and is because the Zip/JAR file is opened where we should consider opening JAR files with the FILE_SHARE_DELETE sharing mode. The implementation of the java.nio.file API uses this sharing mode by default, java.io does not. Note that the issue here is specific to Zip/JAR files opened by the java.util.zip/java.util.jar APIs, it is not a suggestion to change java.io as that has wider implications.

            lancea Lance Andersen
            alanb Alan Bateman
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: