Is it possible to have 2 modules with the exact same name (but with slightly different contents) on the module path?
As far as I can tell, the Java 9 compiler does not complain about it. I have 2 modules declared as follows:
module com.dj.helper {
exports com.dj.helper;
}
Both contain the com.dj.helper
package but within the package the contents are different. Then in my main application, I am looking to import this module:
module com.dj {
requires com.dj.helper;
}
Both modules with the same name are on my module path.
I was hoping that when compiling my com.dj
module that the compiler would complain about the same module existing twice but it does not. Does this effectively mean you could have 2 versions of the same jar on your module path and Java will not know which one to use?