Hi Bart, great post. Hope you will be as patient and polite with me as with others.
I am new to java and want to use a .properties file for the classic reason you have expressed here i.e. Connecting to a db from different environments where the code might be running.
I used your code 'as is'
Properties configFile = new Properties();
configFile.load(this.getClass().getClassLoader().getResourceAsStream("/db.properties"));

but i get an error in my eclipse:
Multiple markers at this line
- Syntax error on token "load",= expected after this token
- Syntax error token(s), mispleced construct(s)
And there are no default proposals offered by eclipse