Hi all,
I create JPMS layer this way:
Configuration cf = parentLayer.configuration().resolveAndBind(moduleFinder,
ModuleFinder.of(), moduleNames);
ModuleLayer layer = parentLayer.defineModulesWithOneLoader(cf,
parentClassLoader);
And I have a problem with adding implementation modules. These implementation
modules are ignored by JPMS because classes from these modules are not used
anywhere (it is clear, that classes from API modules are used). So, JPMS
doesn't add these modules to layer.
As I understand, if I spoke about implementation modules on boot layer, I could
use --add-modules jvm argument. However, I couldn't find any information how to
force JPMS load my module (even if its classes are not used) for dynamically
created layers.
Could anyone say how to do it?
--
Best regards, Alex Orlov