JDK-8226948 : Release Note: A jrt URI Can Only Encode Paths to Files in /modules Tree
  • Type: Sub-task
  • Component: tools
  • Sub-Component: jlink
  • Affected Version: 13
  • Priority: P4
  • Status: Closed
  • Resolution: Delivered
  • Submitted: 2019-06-28
  • Updated: 2019-08-09
  • Resolved: 2019-06-28
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 13
13Resolved
Description
A `jrt` URL is a hierarchical URI with the syntax `jrt:/[$MODULE[/$PATH]]`. When using the `jrt` file system, a `java.net.URI` object can be created with the `java.nio.file.Path::toUri` method to encode a normalized path to a file in the `/modules` tree. A `jrt` URL cannot encode a path to a file in the `/packages` tree. The `jrt` file system provider has been changed in this release so that `toUri` fails with `IOError` when it is not possible to encode the file path as a `jrt` URI. This change might impact tools that assume a URI can be created to locate files in the `/packages` tree. Tools with paths to files in `/packages` can use the `toRealPath()` method to obtain the real path (in `/modules`) before attempting to convert the file path to a URI.