logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacob Kjome" <h...@visi.com>
Subject Re: Loading log4j.properties from jar file?
Date Wed, 23 Apr 2008 17:35:21 GMT

On Wed, 23 Apr 2008 05:13:27 -0700 (PDT)
  AbelMacAdam <abel.macadam@gmail.com> wrote:
> 
> Hi,
> 
> Today I found out the log4j.properties file my program was using was the one
> in the same directory as the jar file of the program. And I was hoping to
> use the log4j.properties file contained in the jar file.
> 
> When I jar my application I use:
> jar cfm myapp.jar Manifest.txt nl log4j.properties HelpWindow.html
> images\*.PNG
> 
> When I start the program I use
> java -Dlog4j.configuration=file:log4j.properties -jar myapp.jar
> 
> And with this command I use the external properties file.
> 
> So what command do I need to use to use the internal properties file?
> 

The following should work...

java -Dlog4j.configuration=jar:file:myapp.jar!/log4j.properties -jar myapp.jar


Jake

> Abel
> -- 
> View this message in context: 
>http://www.nabble.com/Loading-log4j.properties-from-jar-file--tp16834461p16834461.html
> Sent from the Log4j - Users mailing list archive at Nabble.com.


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


Mime
View raw message