Multi-Release JAR file patch as applied to build 108 of Java 9 breaks almost every project out there (Apache Ant, Gradle, partly Apache Maven)

Paul Sandoz paul.sandoz at oracle.com
Tue Mar 8 10:40:48 UTC 2016


Hi Andre,

> On 6 Mar 2016, at 00:15, André-John Mas <andrejohn.mas at gmail.com> wrote:
> 
> Hi,
> 
> Given the issues we are seeing, and I suspect this is not the only code with these assumptions, is there any way this functionality can be limited to "multi-release aware" code, either via a constructor parameter or a new method? What is the most elegant approach?
> 

For resource URLs, associated with an MR-JAR, and obtained from a class loader, here are three possible routes we could take:

1) Modify the resources URLs, cognisent of the known issues processing such URLs;
2) Resources URLs are reified; or
3) Resources URLs are not modified (meaning they are not runtime versioned).


By 2) i mean that:

  URL u = loader.getResource(“foo/Bar.class”)

may return u that is say:

  “jar:file:/….!/META-INF/versions/9/foo/Bar.class”

rather than:

  “jar:file:/….!/foo/Bar.class”

But we need to work through the implications of that approach.

Paul.






More information about the core-libs-dev mailing list