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
).findAll().stream().findFirst();
>> >
>> > Rémi
>> >
>> > - Mail original -----
>> >> De: "Gunnar Morling"
>> >> À: "Alan Bateman"
>> >> Cc: "jigsaw-dev"
>> >> Envoyé: Mardi 25 A
>
> > - 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
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
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.
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
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
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()