commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Orjan Nygaard Austvold <austv...@colibria.com>
Subject Re: commons configuration: user specified configuration file?
Date Tue, 28 Sep 2004 20:35:19 GMT
Ah, thanks! That should work.


Ørjan


Emmanuel Bourg wrote:

 > You could use the ConfigurationFactory, but since the user file isn't
 > known it's easier to build a CompositeConfiguration directly. It would
 > look like this:
 >
 > CompositeConfiguration config = new CompositeConfiguration();
 > config.addConfiguration(new
 > PropertiesConfiguration("default-config.properties"));
 > if (userConfig != null) {
 >     config.addConfiguration(new PropertiesConfiguration(userConfig));
 > }

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message