Is it possible to add JRE and JDK modules in child layers?

PavelTurk pavelturk2000 at gmail.com
Wed Jan 17 17:22:08 UTC 2024


Hello all.

We use JPMS for our framework where we have the following layers:

1) boot layer: framework + JRE/JDK modules (to add them we use --add-modules ALL-DEFAULT)
2) child layers [with child layers..] where every child layer is dynamically added component.

As I understand Layrry framework does the same.  I asked several days ago about practical use
of JPMS layers and got only one response about Layrry. So, I can conclude that layers are used
primarily for creating dynamic substems, plugins, components, extensions etc.

However, we couldn't find a way to add JRE and JDK modules in child layers. Because of this we
have to add all default modules to boot layer what is a very very serious flaw.

Why do we need it? As components are created dynamically when/if they are required we don't
know what JRE/JDK modules will be required we create boot layer. That's why add all of them to
boot layer.

Could anyone say if it is possible to add JRE/JDK modules to child layers? Is there any way to do it?
Are there any plans to add such possibility?

Best regards, Pavel


More information about the jigsaw-dev mailing list