RFR: JDK-8220702: compiling in the context of an automatic module disallows --add-modules ALL-MODULE-PATH

Alan Bateman Alan.Bateman at oracle.com
Fri Apr 12 13:19:50 UTC 2019

On 12/04/2019 13:34, Jan Lahoda wrote:
> :
> Consider a directory "path" that contains "automatic.jar", which does 
> not have a module-info.class, and "explicit.jar" which has 
> module-info.class. The a compilation in multi-module mode might look 
> like this:
> $ javac -d out --patch-module automatic=test/automatic/src 
> --patch-module explicit=test/explicit/src --module-path path 
> --module-source-path dummy 
> test/automatic/src/automatic/AutomaticTest.java 
> test/explicit/src/explicit/ExplicitTest.java

I think this mean that "automatic" reads "explicit" and all other 
modules that the recursive enumeration of "explicit" brings to the 
graph. This AutomaticTest can refer to any of the public types in any of 
the packages exported by the modules. There was a suggestion in one of 
the mails that the set of default modules (all those in the run-time 
image that export an API) would also be resolved but I don't think this 
is the case here.


More information about the compiler-dev mailing list