hi

I was just trying the following sample:


        ModuleFinder finder = ModuleFinder.of(path);   //path points to the 
location of a jar with an unnamed module
        finder.findAll().forEach(System.out::println);
        Layer parent = Layer.boot();
        Configuration cf = parent.configuration().resolveRequires(finder, 
ModuleFinder.of(), Set.of());
        ClassLoader scl = ClassLoader.getSystemClassLoader();

        Layer newLayer=parent.defineModulesWithManyLoaders(cf, scl);
        newLayer.modules().stream().forEach(System.out::println);



Thank u for ur help

________________________________
De : Alan Bateman <alan.bate...@oracle.com>
Envoyé : lundi 1 août 2016 16:32
À : charbel yazbeck; jigsaw-dev@openjdk.java.net
Objet : Re: Issue with an automatic module

On 01/08/2016 08:37, charbel yazbeck wrote:

> Hi
>
>
> i was trying to play around latest jigsaw version in order to adapt an open 
> source projet that i developed and i found the following issue.
>
> When using a jar containing a class with no package, the modulefinder is 
> failing to create its module descriptor.
>
>
A named module (this includes automatic modules) can't have types in the
unnamed package. So the FindException is correct, this seems to be JAR
file that can't be automatic module. Do you know this plugin? It is
completely in the unnamed package?

-Alan

Reply via email to