SPI for customizing modules?

Alan Bateman Alan.Bateman at oracle.com
Mon Aug 1 22:51:42 UTC 2016

On 01/08/2016 08:29, Paul Benedict wrote:

> Jigsaw Experts,
> It seems the only way to customize modules is not to use --module-path. It
> seems if I want to customize, I have to load myself. Right or wrong?
> I am looking for an SPI where I can customize any non-JDK module. I believe
> this would be easier than the current path I am on. I'd rather just provide
> a service the JDK can call for anything it finds in --module-path so I can
> customize each module loaded.
> Please advise.
You should be able to do this with a simple launcher, essentially the 
code fragment in the recent mail with Jochen [1] but replacing it with 
your ModuleFinder. This is preferable to creating two layers at startup, 
and it avoids chicken 'n egg issues that would arise if your finder 
module needed to be resolved in order to find the modules for the boot 


[1] http://mail.openjdk.java.net/pipermail/jigsaw-dev/2016-July/008919.html

More information about the jigsaw-dev mailing list