I am developing an application that uses a library that loads a configuration file like:
InputStream in = getClass().getResourceAsStream(resource);
My application is then packaged in a .jar file. If resource is inside the .jar file, I can specify the path as "/relative/path/to/resource/resource" .
I would like to know if a resource can be found if it is outside the .jar file, and in this case, how would I specify the path.
(Suppose my application bar is in app/ and the resource is in app/config ).
The program uses a 3 rd party library. The library uses the resource as a configuration file.
I also want to configure the configuration file without having to unzip / archive the jar file.
kunigami
source share