Load properties file from external directory
I am currently loading properties files from a resource stream like this -
prop.load(LoadTest.class.getClassLoader().getResourceAsStream("database.properties"));
But what I'm looking for is if I can load properties files from any external directory. Suppose my file database.properties
is in
C:\logging-test\database.properties
Then how do I load the above properties file from that location? Any thoughts?
+3
source to share