Initial module-system design, API, and early-access builds

mark.reinhold at oracle.com mark.reinhold at oracle.com
Thu Sep 10 22:26:52 UTC 2015


2015/9/10 3:00 -0700, snfuchs at gmx.de:
> reading the overview document I stumbled upon the sentence, that the 
> module declaration should by convention go to a file named 
> module-info.java and therefore complied to ||module-info.class file in 
> the root directory of the jar file. Does this mean, that a modular jar 
> file may only contain one module at a time?

Yes.

>                                             For many applications it is 
> common practice to fold all compiled classes and its dependencies into 
> one big jar file. Would this still work?
> Wouldn't it be better to include the module name in the file name?
> e.g.: com-foo-bar-module-info.java

The assumption behind the modular-JAR concept is that a JAR file is a
single unit of release and re-use, rather than a collection of all the
components that make up an entire application, so there's no need to
package more than one module into such a JAR.

If you think it's critical for modular JARs to support multiple modules
then please let the EG know (jpms-spec-comments at openjdk.java.net).

- Mark


More information about the jigsaw-dev mailing list