Applications for --limit-modules?

Alan Bateman Alan.Bateman at oracle.com
Sat Jan 28 19:32:28 UTC 2017


On 28/01/2017 18:39, Nicolai Parlog wrote:

>   Hi Alan,
>
> thanks for your reply. Yes testing is a good example, didn't have that
> idea. So testing and services, then?
Yes, and for service providers then you might specify one or two to 
--limit-modules when converging on the set of service provide modules to 
explicit link into a run-time image.


> :
> Based on my observations that is not the case. At least the initial
> module is _not_ used as a root module to determine the universe of
> observable modules. This only works if bar is in foo's transitive closure:
>
> 	java -p mods --lomit-modules foo -m bar
This limits the set of observable modules to `bar` plus the transitive 
closure of `foo`. This will fail immediately if `bar` transitively 
depends on a module that it's in the foo++ set. You might need to work 
through a few examples to convince yourself of course.

-Alan


More information about the jigsaw-dev mailing list