If the path is relative to your application, then:
getPath() getAbsolutePath() getCanonicalPath()
If you want a configurable path, place a configuration file where your application knows where to find it (relatively speaking) and read the path from the configuration file.
Relative to what might be the question. This line:
will create a file relative to the current user directory. See System Properties to get the current home.
You can also make a file relative to another file or a path string:
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
I'm so happy! And I wish to make this tiny ad happy too:
a bit of art, as a gift, the permaculture playing cards