Re: Getting the automatic module name of non-modular JAR

2017-04-26 Thread Alan Bateman
On 26/04/2017 09:14, Gunnar Morling wrote: It's described in the JavaDoc of ModuleFinder#of(): http://download.java.net/java/jdk9/docs/api/java/lang/module/ModuleFinder.html#of-java.nio.file.Path...- Not sure whether there's another more authoritative source. That is the right link and

Re: Getting the automatic module name of non-modular JAR

2017-04-26 Thread Gunnar Morling
).findAll().stream().findFirst(); >> > >> > Rémi >> > >> > - Mail original ----- >> >> De: "Gunnar Morling" >> >> À: "Alan Bateman" >> >> Cc: "jigsaw-dev" >> >> Envoyé: Mardi 25 A

Re: Getting the automatic module name of non-modular JAR

2017-04-26 Thread Cédric Champeau
> > > - Mail original - > >> De: "Gunnar Morling" > >> À: "Alan Bateman" > >> Cc: "jigsaw-dev" > >> Envoyé: Mardi 25 Avril 2017 09:10:45 > >> Objet: Re: Getting the automatic module name of non-modular

Re: Getting the automatic module name of non-modular JAR

2017-04-25 Thread Gunnar Morling
jigsaw-dev" >> Envoyé: Mardi 25 Avril 2017 09:10:45 >> Objet: Re: Getting the automatic module name of non-modular JAR > >> I see; thanks, Alan. >> >> I wanted to avoid using a regex or similar, in order to make sure the >> JDK's own auto

Re: Getting the automatic module name of non-modular JAR

2017-04-25 Thread Remi Forax
ril 2017 09:10:45 > Objet: Re: Getting the automatic module name of non-modular JAR > I see; thanks, Alan. > > I wanted to avoid using a regex or similar, in order to make sure the > JDK's own automatic naming rules are applied instead of > "re-implementing" them.

Re: Getting the automatic module name of non-modular JAR

2017-04-25 Thread Gunnar Morling
I see; thanks, Alan. I wanted to avoid using a regex or similar, in order to make sure the JDK's own automatic naming rules are applied instead of "re-implementing" them. I was kinda hoping for a method like Path jar = ...; Optional ref = ModuleReference.of( jar ); 2017-04-25 8:49 GMT+0

Re: Getting the automatic module name of non-modular JAR

2017-04-24 Thread Alan Bateman
On 24/04/2017 21:23, Gunnar Morling wrote: Hi, Given a non-modular JAR (e.g. represented as Path), what's the easiest way to obtain the automatic module name derived for this JAR? If you just want the name then it might be more efficient to do it with a regular expression. I found the foll

Getting the automatic module name of non-modular JAR

2017-04-24 Thread Gunnar Morling
Hi, Given a non-modular JAR (e.g. represented as Path), what's the easiest way to obtain the automatic module name derived for this JAR? I found the following: Path nonModularJar = ...; String automaticModuleName = ModuleFinder.of( nonModularJar ) .findAll() .iterator()