The `jar` tool's extract operation has been enhanced to allow the `--keep-old-files` and the `-k` options to be used in preventing the overwriting of existing files.

      *Examples:*

      `jar xkf foo.jar`

      or

      `jar --extract --keep-old-files --file foo.jar`

      Either of these commands will extract the contents of `foo.jar`. If an entry with the same name already exists in the target directory, then the existing file will not be overwritten.

      For more details, see the [jar command](https://docs-uat.us.oracle.com/en/java/javase/24/docs/specs/man/jar.html) man page.

            henryjen Henry Jen
            mtrudeau Michel Trudeau
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: