On 28/10/2015 20:34, Karl Sanders wrote:
Hi,

I'm trying out the JDK 9 EA with Jigsaw.

I created two modules, A and B, which are required by module C.

Modules A and B contain a non-exported package with the same name.

After compiling each module separately I start module C and get a
java.lang.reflect.LayerInstantiationException saying that modules A
and B contain a package with the same name.
The restriction is that no two modules with the same package (irrespective of whether it is exported or not, or who reads the modules) can be mapped to the same class loader. At this time, all modules on the application module path are mapped to the application class loader and I'm guessing that this is what it arising here.

-Alan.

Reply via email to