From what I've seen, a properties file is used to handle environment and application-specific properties at runtime.
Let's say, for instance, that you have two properties files - one for development, and one for production. Here's what they'd look like:
Dev properties:
application.flag=true
Production properties:
application.flag=false
They're both the same filename, so you don't have to worry about reading in a "different" file.
You would then load the file in, and read that particular property:
Properties properties = new Properties();
InputStream inputStream = null;
try {
inputStream = new FileInputStream("/path/to/application/app.properties");
properties.load(inputStream);
System.out.println(properties.getProperty("application.flag"));
} catch (IOException e) {
e.printStackTrace();
}
If you had production's value set in that file, you'd get false
. If you had development's value, you'd get true
.