It is safe to use same classes from same modules in different layers

PavelTurk pavelturk2000 at gmail.com
Mon Sep 9 07:30:43 UTC 2024


> However, note that the JPMS is not limited to a single parent layer. You could add a separate layer containing Foo, which could be an additional parent for both, layer A and B. Depending on your context, plugin B may also declare a dependency on plugin A, and therefore get child layer A as a parent. I don't think that I can give you a proper recommendation as I don't know much about your project. (Also not that I am NOT affiliated with the OpenJDK project, I am just a fellow subscriber to this mailing list.)
>
Yes, it is possible to add different parent layers in JPMS, however, it is not a real solution for  a real application with plugins.
Why? Because plugins can be added by user dynamically, for example, he can activate only plugin A, or only plugin B.
Or he can activate firstly plugin B and only after activate plugin A.

So, JPMS is great, but how to solve such problem in real application with plugins? Or is JPMS not supposed to be used with plugins?

Best regards, Pavel



More information about the jigsaw-dev mailing list