On 14/08/2017 09:35, Oleg Tsal-Tsalko wrote:
2. Why compilation doesn’t fail in case several modules with same name
put on module-path, but it only fails in runtime on startup (
https://github.com/AdoptOpenJDK/jdk9-jigsaw/tree/master/session-1-jigsaw-intro/08_ModulesExportConflict
)?
Just to Alex's comment on this point. The behavior you observe is
specific to exploded modules. If the module path is a directory of two
JAR files containing modules of the same name then javac will detect the
duplicate as you would expect.
4. If there are 3 conflicting modules in module path error says only
about 2 first modules conflict only. Why that? Fail fast?
The java launcher has a `--validate-modules` options which can be useful
to report all potential errors without failing fast. It's particularly
useful when starting out with a module path that has a lot of automatic
modules that may have conflicting packages and other issues.
-Alan