Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how do I specify -Dlog4j.configuration if log4j.properties is in a jar?

807580Dec 2 2009 — edited Dec 2 2009
Hi,
I usually would specify the property file like this:

-Dlog4j.configuration=file:<path to log4j.properties>

However, the customer requests that deliverables be bundled in the single jar so that getResourceAsStream can be used to extract the resource data. As a consequence my log4j.properties goes into the jar. Now on the command line, what do I type in there

-Dlog4j.configuration=????

to tell log4j where to find the .properties?

Many thanks,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 30 2009
Added on Dec 2 2009
2 comments
10,382 views