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!

access log4j.properties outside source folder

833473Apr 20 2011 — edited Apr 20 2011
Hi,

I have developed a standalone java application, for logging the application i have created a log4j.properties in the source folder.
it is woring fine and the logs are created as specified in the properties file.

Issue:
i have created a jar which contains the complete source code and log4j.properties file.

if i try to create a jar without log4j.properties since the properties file will change by customer frequantly, i need to keep the log4j.properties outside the source folder.

but my jar is unable to access the log4j.properties when i try to run the appplication.

Question:

how do we access the log4j.properties from outside source folder?


thanks,
J R
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 18 2011
Added on Apr 20 2011
8 comments
3,039 views