I have a main conf file which I load using apache common configuration class. I have a requirement where user can specify a conf file and values in those file will override the
I think you want something similar to the mechanism described here:
CompositeConfiguration config = new CompositeConfiguration();
config.addConfiguration(new PropertiesConfiguration("user.properties"));
config.addConfiguration(
new PropertiesConfiguration("application.properties"));
// user preferences have precedence over application preferences
Reference: