I am running a class on an application server and trying to find a relative path so I can load a file from within my Java class.
I have been investigating using this.getClass().getResource("../") and get the location of the running class, which is good, but when I try to navigate up the tree I can get so far and then I get null.
Note that testF jumps from the classes dir to properties for some reason and then testG returns null.
What I want to do is get to myappwar directory. note this is not a servlet
Is this the correct approach or should I use some other way?
Thanks for reading
subject: Finding path location on server returning null