modulepath spec

Paul Benedict pbenedict at
Mon Dec 7 20:00:31 UTC 2015

To summarize, I have thus far seen these two needs on the list:

1) The need to specify a list of jar modules by name. This is to support
identifying what modules out of a set need to loaded. An example use case
would be the "target" directory of a Maven project, where more than one
module artifact might exist (i.e., main module and test module).

2) The need to specify an exploded directory by name. This is to support
eliminating the packaging phase during build/test cycles, which can be an
excessive time burden for projects that are structured in a deeply nested
Maven project structure.

PS: There is a special case of #1 that is probably also useful: wildcard
patterns (*.car, *.jar, etc.) to prevent unwieldy command line lengths.


On Mon, Dec 7, 2015 at 1:46 PM, Alan Bateman <Alan.Bateman at>

> On 07/12/2015 17:18, Stephane Epardaud wrote:
>> Hi,
>> When there is a -modulepath argument, is it a path in the Unix sense?
>> With a list of File.pathSeparator-separated folders?
>> Ceylon produces `.car` files instead of `.jar` files, but they're really
>> zip files like jars. Will Java examine the file type to determine that
>> it's a zip file, or will it give up at its name?
>> Will there be support for module folder trees? Otherwise it pretty much
>> forces Maven/Ceylon users to copy modules from a tree to a flat folder.
>> That's an extra step, and it's possible, but it'd be nice if it weren't
>> mandatory. I know there are several tree mappings that don't entirely
>> correspond, with Ant, Maven, OSGi and Ceylon possibly differring
>> slightly, so this may be difficult.
>> Worst case I'll add a "ceylon export-java-mlib my.module/2.0" to create
>> that mlib folder and populate it flatly and rename `.car` files to `.jar`.
>> Module path is conceptually very simple, it's just a sequence of sets of
> modules.
> As things currently stand then the -mp argument to javac and java is a
> sequence of directories, with File.pathSeparator as the separator. The
> current implementations just looks for exploded modules or files ending
> with ".jar" files in those directories. So ".car" files will be ignored.
> There are also ".jmod" files that are also zip format but with a different
> internal structure.
> The layout issue is something that Robert Scholte brought up in the last
> few days too (in the context of Maven). There are a couple of ideas
> floating around but no conclusions yet. In Robert's thread then the
> suggestion is that it allow file paths to JAR files (like class path). I
> don't think there is any conclusion on this topic yet so feedback in this
> area is timely.
> -Alan.

More information about the jigsaw-dev mailing list