Currently I am using the absolute path to open a properties file, shown as below:
In my PropertiesUtil constructor, I use the following code to open the file:
I am not writing a single program. The above code is written in my application package.
The problem of using this method is that, I have to pass in an absolute path of the properties file. How to use a relative path instead?
After some search, I found some example use class dot notation, eg. my.app.properties to locate a properties file.