log4j.properties not working in executable jar

Viewed 12153

I'm using eclipse and I have placed log4j.properties in the project directory and I access it by calling

PropertyConfigurator.configure("log4j.properties");

this works fine in Eclipse, but when I extract the project as an executable Jar and run it on another machine, I get an error saying that it can't find log4j.properties. What is the solution to this?

2 Answers
Related