I am looking to display help pages via a local server and need to access the files from many different modules across a Netbeans Java project.
Currently, I use a lookup of service providers which provide the relative file links for the help pages within that module. This allows for modules to be added dynamically and extra help pages are displayed.
The whole concept works when running from the Netbeans IDE, but has issues when running from a JAR source.
I will need to get an InputStream from within the JARs. The project uses unnamed modules, and that causes a problem because I cannot look up the modules by name. I wanted to look up the modules so I could get their class loaders.
I do have the relative filename which also includes the file path of the class and the module.
That seems to be the main issue - How can I get a resource from a jar, that is not in the same module as the local server code? (using unnamed modules)
local server -> getAllProviders() -> module1/path/to/help1a
-> module1/path/to/help2a
-> module2/path/to/help1b
-> module3/path/to/help1c
The local server will then need to somehow use these paths, which have a module name within them, to retrieve an input stream from the JAR to display the .md files.