JDK-8207395 : jar should support UNC-path arguments for the jar -C parameter
  • Type: Enhancement
  • Component: tools
  • Sub-Component: jar
  • Affected Version: 11
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • CPU: generic
  • Submitted: 2018-07-17
  • Updated: 2019-11-25
  • Resolved: 2018-07-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12
11.0.3Fixed 12 b04Fixed
Description
Currently the  jar -C  parameter fails on Windows with UNC paths.
For example with jdk10 :


c:\testdir>c:\tools\jdk10\bin\jar.exe test.jar  -C \\MYMACHINE\subdir  README.txt
Illegal option: s
Try `jar --help' for more information.


... while  the  directory (and README.txt in it) is present :


c:\testdir>dir \\MYMACHINE\subdir
.......
 Directory of \\MYMACHINE\subdir

17.07.2018  12:25    <DIR>          .
17.07.2018  12:25    <DIR>          ..
17.07.2018  12:25                 0 README.txt

Comments
Fix Request This fix simplifies using the jar tool. The VM on Windows should support UNC paths. The fix is simple. I don't see any dangers. Applies clean.
14-11-2018