Module API usage questions

Paul Benedict pbenedict at apache.org
Tue Jul 19 21:34:49 UTC 2016


On Tue, Jul 19, 2016 at 3:00 PM, Alan Bateman <Alan.Bateman at oracle.com>
wrote:

> On 19/07/2016 19:38, Paul Benedict wrote:
>
>> 2) Must all modules that could ever be loaded be specified on the module
>> path? I was hoping to find a hook where I could provide by own
>> implementation of ModuleFinder that has all that knowledge self-contained.
>> I think the answer may be Configuration::resolveRequires, but please
>> confirm.
>>
> Yes, you probably want something like this:
>
> Configuration parent = Layer.boot().configuration();
> Configuration cf = parent.resolveRequires(ModuleFinder.of(), myfinder,
> Set.of("myroot"));
>
>
Alan, was your "yes" to affirming "all modules be on the module path" (thus
precluding introducing new ones at runtime) or affirming resolveRequires()?

Cheers,
Paul


More information about the jigsaw-dev mailing list