-jar option and the modulepath

Alan Bateman Alan.Bateman at oracle.com
Sat Nov 24 10:10:18 UTC 2018

On 23/11/2018 19:51, Scott Palmer wrote:
> I’m curious how this relates to the -m or —module option.
> I had though it looked like the module equivalent of the -jar option.
The argument to --module/-m is a <module-name> (or 
<module-name>/<main-class>), not a JAR file. I'm sure the topic of 
executable modular JARs files be back on the table some day but it needs 
to be looked at in conjunction with the issues around having multiple 
modules in the same artifact. They would be likely be work needed in 
several Maven plugins and other parts of the eco system too.  In the 
mean-time, it's not too hard to package multiple modules into the same 
JAR file and have a main class that creates a configuration and module 
layer from the modules in the JAR files.


More information about the core-libs-dev mailing list