JDK-8066492 : Enhance jrt file system to support /modules and /packages directories
  • Type: Enhancement
  • Component: tools
  • Sub-Component: jlink
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-12-02
  • Updated: 2017-05-17
  • Resolved: 2015-06-26
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 9
9Fixed
Related Reports
Blocks :  
Description
Paths in the "jrt:/" NIO filesystem are currently of this form:

  /$MODULE/$PATH

where $MODULE is a module name (e.g., "java.base") and $PATH is the name
of a resource, most often the binary name of a class.

Let's add a directory level, and support two forms:

  /modules/$MODULE/$PATH
  /packages/$PACKAGE/$MODULE

where $PACKAGE is a package name (e.g., "java.lang").  A path of the
second form names a symbolic link which, in turn, points to the
directory under /modules that contains a module that defines that
package.  Example:

  /packages/java.lang/java.base -> /modules/java.base

To find java/sql/Array.class without knowing its module you look up
/packages/java.sql, which is a directory, and enumerate its entries.
In this case there will be just one entry, a symbolic link named
"java.sql", which will point to /modules/java.sql, which will contain
java/sql/Array.class.

The reason for having /package/$PACKAGE be a directory of symbolic links
to module directories rather than such a symbolic link itself is that in
some scenarios multiple modules can contain packages of the same name.

Comments
This has been pushed to jdk9/hs-rt as part of the jimage refresh (JDK-8080511).The change-set comment was incomplete and didn't list JDK-8066492.
26-06-2015