I need to load a file outside of the JAR, but relative to it (lib/config/config.ini
to be exact). I used that exact path, and it works fine as long as the working directory is where the JAR is, i.e.
/path/to/jar$ java -jar JAR.jar
If it's run like this:
~$ java -jar /path/to/jar/JAR.jar
It can't find it. How can I correctly load a file relative to the location of the JAR?