JEP-282: JLink two modules exporting the same package name
Alex Buckley
alex.buckley at oracle.com
Wed Oct 12 18:56:41 UTC 2016
In general, there is no problem with modules in the image or on the
modulepath that contain and export the same package. The problem comes
when a single module requires two other modules which both contain and
export the same package. There is no such single module in the image
you're creating -- your modules A and B are independent.
Alex
On 10/12/2016 11:17 AM, Karl Heinz Marbaise wrote:
> Hi,
>
> i have a question concerning the jlink command in JDK 9..(EA +138 build)
>
> I have created two modules lets call them module A and module B
> (module-info.java):
>
> module A {
> requires java.base;
> exports com.single.package;
> }
>
> module B {
> requires java.base;
> exports com.single.package;
> }
>
> both export the same package: com.single.package
>
> The question is: Shouldn't the jlink command fail in such cases cause
> both modules export the same package ?
>
> Otherwise it would mean to fail at the time of starting the generated
> JVM image which I think is too late...
>
> WDYT ?
>
>
> Kind regards
> Karl Heinz Marbaise
More information about the jigsaw-dev
mailing list