RFR 8156497: Add jar tool support for Multi-release modular JARs
Jonathan Gibbons
jonathan.gibbons at oracle.com
Fri May 20 16:01:20 UTC 2016
It would be good if (eventually) there were test cases involving the use
of MRM jars, both via the JarFile API and jar-fs file system, perhaps
extending to the use of MRM jars in javac as well.
-- Jon
On 05/20/2016 08:55 AM, Chris Hegarty wrote:
> What do you get if you mix JEP 261 [1] with JEP 238 [2]?
> A Multi-release modular JAR.
>
> This issue proposes to add support to the jar tool for creating and
> updating modular JAR files with an optional module-info.class in the
> versioned section.
>
> MRJARs are intended to target multiple releases of the Java platform, so
> it seems reasonable for a Multi-release modular JAR ( MRMJAR ) to be
> able to declare a different set of dependencies on modules that are part
> of the Java platform. The reasoning here is that these are
> implementation details rather than parts of a module's API surface, and
> that one may well want to change them as the JDK itself evolves. The
> runtime already has support for loading from the versioned section.
>
> Specifically, a versioned module descriptor must be identical to the
> root module descriptor, with two exceptions:
>
> - A versioned descriptor can have different non-public `requires`
> clauses of platform ( `java.*` and `jdk.*` ) modules, and
>
> - A versioned descriptor can have different `uses` clauses, even of
> service types defined outside of `java.*` and `jdk.*` modules.
>
> http://cr.openjdk.java.net/~chegar/8156497.00/
>
> Note: while there are some new test scenarios added, which give
> reasonable coverage, further tests will be added later. Steve has some
> additional jar tools support coming for easier creation of MRJARS.
>
> -Chris.
>
> [1] http://openjdk.java.net/jeps/261
> [2] http://openjdk.java.net/jeps/238
More information about the jigsaw-dev
mailing list