Modules with packages duplication
Alan Bateman
Alan.Bateman at oracle.com
Wed May 4 14:03:38 UTC 2016
On 04/05/2016 14:18, Konstantin Barzilovich wrote:
> Hello,
>
> I can see that RI checks if there are packages with the same names in
> different modules (named or unnamed).
> This check fails even if there is no clash (no module can read both
> packages).
> Will it be the same in final version of JDK9 or it can be changed soon?
>
I think you are asking about modules on the application module path
(`java -modulepath ...`) that are resolved at startup. These are defined
to the application class loader so they cannot have overlapping
packages. It's trivial to do things like map each module in its own
class loader but that messes with visibility with lots of implications
(particularly when running with both a class path and module path or
where you bringing automatic modules into the picture). So what you are
seeing is specific to the boot Layer and no specific short term plans to
change this.
-Alan
More information about the jigsaw-dev
mailing list