I am using CompositeConfiguration to read properties from multiple sources (like .propeties files, xml files, System properties etc) as below.
ConfigurationFactory factory = new ConfigurationFactory("config.xml");
compConfig = (CompositeConfiguration)factory.getConfiguration();
compConfig.getProperty(propName);
Config.xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<properties fileName="Properties1.properties"/>
<properties fileName="Properties2.properties"/>
<properties fileName="Properties3.properties"/>
<system/>
</configuration>
In addition to these files, I would like to read Preferences saved in Windows registry as well. I understand that java.util.Preferences API can be used to access values in Windows Registry. I was just wondering if there is a way to read them as well using PropertiesConfiguration?
Thanks