Jlink Services

Michał Kłeczek michal at kleczek.org
Sun Jun 11 04:06:14 UTC 2023


Ahh sorry. You know bind services and want to limit the providers.

You can limit the set of observable modules with limit-modules and add-modules.
There is also --suggest-providers option but documentation seems to be lacking.

Michał 

> On 11 Jun 2023, at 06:01, Michał Kłeczek <michal at kleczek.org> wrote:
> 
> --bind-services
> 
> You're welcome :)
> 
> Michał 
> 
>> On 10 Jun 2023, at 23:03, Josiah Noel <josiahnoel at gmail.com> wrote:
>> 
>> 
>> Heya, I've been using Jlink lately to create application images, and I can't help but notice that I have to add my service provider modules manually. The current bind-services flag doesn't help me since I'm only interested in a few services and want to keep the image size down.
>> 
>> Would it be possible to get a sort of "add-services" argument that would resolve all modules that provide the given service class?
>> 
>> I'm thinking of something like:
>> 
>> ```
>> jlink --module-path mods  --add-modules com.comsumer --add-services com.provider.spi.ServiceClass
>> ```
>> 
>> -- 
>> Cheers, Josiah.


More information about the jigsaw-dev mailing list