commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Bessmertnyj" <d...@isd.dp.ua>
Subject Commons Logging settings
Date Tue, 02 Jan 2007 17:12:17 GMT
I have software which I deliver to client through Java Web Start.
I use Apache Commons Logging, but it doesn't work when I use it through Web 
Start,
because it can't find config file for logger.
I deliver my application with certificate and all permissions.
I store config file in jar file which I also deliver to client through JWS.
Here is my code of getting config file on client:

ClassLoader classLoader = this.getClass().getClassLoader();
URL loggerConfigFileURL = classLoader.getResource("resources/logger.cfg");
System.setProperty("java.util.logging.config.file", 
loggerConfigFileURL.toString());


By the way, ClassLoader finds config file in jar, and
loggerConfigFileURL var has value: 
jar:http://localhost:8080/newframework/lib/framework.jar!/resources/logger.cfg
But logger doesn't want to work!!! It's working only if I start locally (not 
through JWS) my application and
map "java.util.logging.config.file" to absoulute local path to logger.cfg 
file (not using URL notation).

How I realize it and what I do wrong?

thnx!

---
Denis Bessmertnyj,
GUI SoftWeb 


---------------------------------------------------------------------
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