We are making use of Zulu JDK 11 and we are facing issue The package com.sample.test is accessible from more than one module: test1.module, test2.sample.
Below is the git url for sample project and screenshot for your reference.
We are making use of Zulu JDK 11 and we are facing issue The package com.sample.test is accessible from more than one module: test1.module, test2.sample.
Below is the git url for sample project and screenshot for your reference.
A simple solution is to rename the package in your second module tes-2
to say com.sample.another.test
and then update your module description to
module test2.sample {
exports com.sample.another.test;
requires transitive test1.module;
}
and things shall work fine.
Having said that, the cause for failure is that no two modules should export the same package
such that they are both resolved in the module layer as s conflict.