commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Heger <>
Subject Re: [configuration] Properties files in jars
Date Fri, 12 Nov 2004 14:35:00 GMT
ConfigurationFactory can load property files from classpath. Did you try

   <properties fileName="/"/>  ?

A couple of steps are performed to resolve the file: It is checked 
whether a full URL or an absolute or relative file name are provided. If 
this fails, the classpath is searched for the specified file.


Grant Ingersoll wrote:

> Hi,
> I am using the commons-configuration-1.0.  I would like to specify a
> property file located in a JAR file.  The following property declaration
> _does_  work:
> <properties
> fileName="jar:file:///c:/myPath/myJar.jar!/"/>
> However, I would like to specify a relative path to the JAR file
> instead of a full path (as other developers on the project may not have
> the file in the same path).  I have tried a variety of combinations, but
> none seem to work.  
> Can anyone shed some light on this?  Is it possible to specify a
> relative path for JAR files like this?  The JAR file is in the
> classpath, if that matters.
> Thanks,
> Grant Ingersoll
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Dipl.-Inform. Oliver Heger
Zentrale Informationsverarbeitung (ZIV) / Bereich Anwenderverfahren
Klinikum der Philipps-Universit├Ąt Marburg
D-35037 Marburg
Tel: +49 6421 28-66923

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message