Another clarification on module source spread across multiple locations
Alan Bateman
Alan.Bateman at oracle.com
Thu Aug 18 12:17:18 UTC 2016
On 11/08/2016 05:50, Jayaprakash Arthanareeswaran wrote:
> Hi Alan,
> I also need a clarification on the following passage in JEP 261:
> /"In large systems the source code for a particular module may be
> spread across several different directories. In the JDK itself
> <http://openjdk.java.net/jeps/201>, e.g., the source files for a
> module may be found in any one of the directories
> |src/<module>/share/classes|, |src/<module>/<os>/classes|, or
> |build/gensrc/<module>|, where |<os>| is the name of the target
> operating system. To express this in a module source path while
> preserving module identities we allow each element of such a path to
> use braces (|{| and |}|) to enclose commas-separated lists of
> alternatives and a single asterisk (|*|) to stand for the module name.
> The module source path for the JDK can then be written as/
> /|{src/*/{share,<os>}/classes,build/gensrc/*}|"/
> While the first sentence states spread across several directories,
> later on it states ' /may be found in any _one_ of the directories/'.
> Does "any one of" really mean "any of" ?
> Can you please confirm that it is indeed possible to specify multiple
> directories at once for a specific module.
>
Jon would be the best person to answer this but "yes", the module source
path specify multiple directories using this syntax. That is, the source
code for a module may be in distinct directories. We have this in the
JDK because there are platform specific classes, also a lot of source
code generated at build time.
-Alan
More information about the jigsaw-dev
mailing list