I'm developing an application that uses a library that loads a configuration file as:
InputStream in = getClass().getResourceAsStream(resource);
My application in then packed in a .jar
file. If resource
is inside the .jar
file, I can specify the path as "/relative/path/to/resource/resource"
.
I'd like to know if is it possible to find the resource if it is outside the .jar
file, and in this case, how would I specify the path.
(Assuming my application's jar is in app/
and the resource is in app/config
).
The program uses a 3rd party library. The library uses the resource as a configuration file.
I also want to tweak the configuration file without having to unzip/zip the jar file all the time.