javac modes
Jonathan Gibbons
jonathan.gibbons at oracle.com
Mon Apr 5 15:10:53 PDT 2010
Alex Buckley wrote:
> On 4/4/2010 9:57 PM, Jonathan Gibbons wrote:
>> 2. Module resolution mode
>>
>> This refers to the way in which javac locates classes and resolves
>> module dependencies.
>
> Do you mean: "in which javac locates classes *of modules other than
> the module for the compilation unit being compiled* and resolves
> module dependencies *of the module for the compilation unit being
> compiled*" ?
Being very pedantic, no, I did not mean what you said, because you
seemed to limit the description to a single compilation unit, whereas I
was trying to come up with a more general "big-picture" description. If
you were to pluralize the occurrences of "compilation unit" in your
amended description, I would have less issue.
>
> I ask because I'm trying to work out where module-info.java fits in.
> Oh wait, here it is:
>
>> In both modes, a module or modules found on the command line (either
>> explicitly or on one of the available path options) will be taken
>> into account by the module resolver, which will look for any
>> unresolved dependencies in the system module library, or a library
>> specified by the -L option.
>
> So you can supply one module-info.java file (3a) or multiple
> module-info.java files (3b) on the command line, whether resolution is
> done with Jigsaw (2a) or ZeroMod (2c).
Yes, that is a subset of what I was saying. You may also find
module-info files on the class path, source path or module path. But
yes, the primary functionality difference between Jigsaw (2a) and
ZeroMod (2c) is where unresolved modules are found (i.e. module
libraries) and how the versions are handled
>
> If you supply zero module-info.java files on the command line, in
> which modes will module-info.class be read silently to obtain
> dependencies for normal compilation units supplied on the command line?
This is a function of the module resolution mode only. module-info
files will definitely be read in Jigsaw (2a) and ZeroMod (2c) modes.
(2d) disables all module processing, so there will be no searching for
module-info files. 294 RI is not yet supported, and it is TBD whether
that mode is explicitly enabled with a new option, or whether it is the
result of processing modules when no module-info files are to be found
(in which case, what do we do if some but not all module-info files are
found.)
>
> Alex
More information about the jigsaw-dev
mailing list