Re: Java Modules and Multi-Release Jar

2018-10-04 Thread Alan Bateman
On 04/10/2018 08:04, Luke Hutchison wrote: : I see in JEP 238 that multi-release jars "will contain" the attribute "Multi-Release: true". Should this "will" be interpreted as "MUST"? i.e. if a manifest file is missing this attribute, but the jar contains some version layers in "META-INF/versi

Re: Java Modules and Multi-Release Jar

2018-10-04 Thread Luke Hutchison
On Sun, Sep 30, 2018 at 2:33 AM Alan Bateman wrote: > If you are running on JDK $N then an entry in META-INF/versions/$N will > override an entry of the same name in versioned sections < $N as well as > the base section. The JarFile javadoc and JEP 238 describe this in detail. > One mental model

Re: Java Modules and Multi-Release Jar

2018-10-01 Thread Alan Bateman
On 30/09/2018 18:01, Ralph Goers wrote: : As for the discussion on why the module info was placed into META-INF/versions/9, I brought up issues with tools that were trying to use Log4j and couldn’t handle finding a class compiled with Java 9 among other classes compiled with Java 7. The sugges

Re: Java Modules and Multi-Release Jar

2018-09-30 Thread Ralph Goers
> On Sep 30, 2018, at 12:34 AM, Alan Bateman wrote: > > On 29/09/2018 20:25, Ralph Goers wrote: >> Following advice I received on this list, the Log4j API jar is defined as a >> multi-release jar with the module-info.java file placed in >> META-INF/versions/9. This should work fine, yet we c

Re: Java Modules and Multi-Release Jar

2018-09-30 Thread Ralph Goers
> On Sep 30, 2018, at 12:34 AM, Alan Bateman wrote: > > On 29/09/2018 20:25, Ralph Goers wrote: >> Following advice I received on this list, the Log4j API jar is defined as a >> multi-release jar with the module-info.java file placed in >> META-INF/versions/9. This should work fine, yet we c

Re: Java Modules and Multi-Release Jar

2018-09-30 Thread Jochen Theodorou
On 30.09.2018 10:33, Alan Bateman wrote:[...] One mental model is to think of it as a search path. If you are JDK 11 then search path for entries in the JAR file is:     META-INF/versions/11:META-INF/versions/10:META-INF/versions/9:. where "." is the top-level directory in the JAR file. wha

Re: Java Modules and Multi-Release Jar

2018-09-30 Thread Luke Hutchison
Thanks for the helpful explanation. On Sun, Sep 30, 2018 at 2:33 AM Alan Bateman wrote: > On 30/09/2018 08:57, Luke Hutchison wrote: > > : > > I have a related question about this specifically. I just added > multi-release jar support to ClassGraph ( > https://github.com/classgraph/classgraph

Re: Java Modules and Multi-Release Jar

2018-09-30 Thread Alan Bateman
On 30/09/2018 08:57, Luke Hutchison wrote: : I have a related question about this specifically. I just added multi-release jar support to ClassGraph ( https://github.com/classgraph/classgraph ). If one or more versioned sections are present and the code is running on JRE9+, then the highest-

Re: Java Modules and Multi-Release Jar

2018-09-30 Thread Luke Hutchison
On Sun, Sep 30, 2018, 1:35 AM Alan Bateman wrote: > I don't recall the discussion here that lead to the advice to put the > module-info.class in META-INF/versions/9 - if you can find the mail > thread or even the subject line of the discussion then it would help > provide the context. In general,

Re: Java Modules and Multi-Release Jar

2018-09-30 Thread Alan Bateman
On 29/09/2018 20:25, Ralph Goers wrote: Following advice I received on this list, the Log4j API jar is defined as a multi-release jar with the module-info.java file placed in META-INF/versions/9. This should work fine, yet we continue to have users who are complaining about various tools, such

Java Modules and Multi-Release Jar

2018-09-29 Thread Ralph Goers
Following advice I received on this list, the Log4j API jar is defined as a multi-release jar with the module-info.java file placed in META-INF/versions/9. This should work fine, yet we continue to have users who are complaining about various tools, such as Javadoc and Eclipse, that can’t handle