Can it load non JPMS jars too ? Maybe this has changed, but my understanding is that everything had to be JPMS modules, meaning that any plugin that has a dependency which is not a JPMS module would not be loadable… That’s a too big constraint imho.
------------------------ Guillaume Nodet Le mer. 7 août 2024 à 18:16, Martin Desruisseaux < martin.desruisse...@geomatys.com> a écrit : > Le 2024-08-07 à 17 h 38, Guillaume Nodet a écrit : > > > Did I miss something ? We need to load plugins at runtime, I thought > > JPMS was static… > JPMS can load plugins at runtime as well. However, the way to do that is > very different. It is no longer with ClassLoader, we have to use > ModuleLayer instead. It is maybe the biggest change when moving from a > non-JPMS to a JPMS environment. I did exactly that one year ago in a > Swing application running tests on a library specified at runtime by the > "File Chooser" dialog box. The commit at [1] gives an idea of the > changes when migrating from a "class loader" world to a "module layer" > world. > > What is static is not JPMS, but jlink, which is only one tool among > others that become available after a project has been modularized. > > Martin > > [1] > https://github.com/IOGP-GIGS/GIGSGeoAPI/commit/ff6321dce23500ddd39aee21b6a90f911c2d1727 >