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!

Loading log4j.properties from jar file?

807591Apr 23 2008 — edited Apr 23 2008

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?

Abel

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 21 2008
Added on Apr 23 2008
2 comments
1,325 views