commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Vandahl ...@apache.org>
Subject [jcs] Re: how to load a property file other than from the classpath
Date Sun, 08 Jan 2012 10:57:03 GMT
Last time I forgot to tell you that a prefix of the module name (here:
[jcs]) is mandatory in user@c.a.o.

On 06.01.12 16:13, Chopin hu wrote:
> I have a property file located at the root of my jar file, which works properly, using
the following code:
> JCS.setConfigFilename("/cache_win.ccf");
> 
> However, now my new requirement is to move the property file to a location other than
the classpath.   I tried the following:
> JCS.setConfigFilename("E:\\projects\\jcs\\conf\\cache_win.ccf");
> 
> I got back the error as below:
> [ERROR] Failed to load properties for name [e:\projects\jcs\conf\cache_win.ccf]
> 
> What is the property way to read in the property file in a file system?   Thanks a lot.

The latest trunk supports JCS.setConfigProperties(java.util.Properties).
Check that one out.

Bye, Thomas.


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


Mime
View raw message