I have the following properties inside config.properties file.
resources=/home/pc/work/resources
file1=${resources}/file1
file2=${resources}/file2
file3=${resources}/file3
And loading the java.util.Properties to read those properties:
properties = new Properties();
InputStream inputStream = PropertyReader.class.getClassLoader().getResourceAsStream("config.properties");
try {
properties.load(inputStream);
} catch (IOException e) {
e.printStackTrace();
}
Apparently, this will always read the values directly from the file.
Is it possible to override the resources
variable as a system variable while maintaining a default value?