> Now say some project adds the X Jar and the Y jar, That is not the issue we have though, but instead the issue we have is if the application ONLY has y.jar (this fails module resolution at runtime on startup).
If y.jar contains 2 modules but there is no x module in the module-path ... how does the second x.y module in y.jar work / how does it change the module resolution so that it does not produce the same error? On Sun, 23 Apr 2023, 10:50 am Josiah Noel, <josiahn...@gmail.com> wrote: > > >> How would this solve the issue? I can't see how having a second module on >> the same jar/artifact would work for this case. >> > > Here's how I envision it. In Jar Y, we'd have two modules. > > >> module y { >> >> exports y.pkgs; >> >> } >> > > and in the second module, we would have the SPI impl class > >> >> module y.inject { >> requires static x; >> provides x.plugin with y.inject.PluginImpl; >> >> } >> > > Now say some project adds the X Jar and the Y jar, the modules should > resolve and X should service load the SPI from the y.inject module. > > >> Instead of a second module my gut says that what would solve this is a: >> 'provides static' >> > > I'd like this too, but I don't think it's gonna happen. >