Auto-modules vs. the unnamed module
Alan Bateman
Alan.Bateman at oracle.com
Thu Apr 27 15:22:18 UTC 2017
On 27/04/2017 15:58, Ceki Gulcu wrote:
>
> Hello all,
>
> Please forgive my possibly silly question but can someone kindly
> explain the advantages of placing a non-modular artifact on the
> module path instead of the class path? In other words, why should the
> user prefer a non-modular artifact to act as an auto-module instead of
> its packages being merged with the unnamed module?
>
> If there are no major advantages for placing an non-modular artifact
> on the module path instead of the class path, then auto-modules serve
> no real purpose and otherwise just increase entropy.
The advantage of automatic modules is that it allows you to treat a
library as a module when compiling or running. It essentially allows you
to make progress on modularization without waiting for everything that
you transitively depend on to migrate first.
The State of the Module System document [1] needs a few updates but it
still provides a useful introducing to the topic.
-Alan
[1] http://openjdk.java.net/projects/jigsaw/spec/sotms/
More information about the jigsaw-dev
mailing list