Issue with an automatic module
charbel_yazbeck at hotmail.com
Mon Aug 1 19:01:50 UTC 2016
I was just trying the following sample:
ModuleFinder finder = ModuleFinder.of(path); //path points to the location of a jar with an unnamed module
Layer parent = Layer.boot();
Configuration cf = parent.configuration().resolveRequires(finder, ModuleFinder.of(), Set.of());
ClassLoader scl = ClassLoader.getSystemClassLoader();
Layer newLayer=parent.defineModulesWithManyLoaders(cf, scl);
Thank u for ur help
De : Alan Bateman <Alan.Bateman at oracle.com>
Envoyé : lundi 1 août 2016 16:32
À : charbel yazbeck; jigsaw-dev at openjdk.java.net
Objet : Re: Issue with an automatic module
On 01/08/2016 08:37, charbel yazbeck wrote:
> 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?
More information about the jigsaw-dev