RE: Log 4j properties file not found after converting it to Jar file.

Good Morning,
I am facing an issue when I convert my project into Exceutable jar file. It is not able able to find the file. Hoever when I keep my properties file along with executable file then it is able to read it.
I dont want to expose my properties file to user.
Could any one of you help me in identifying, how to do it?

Thank you.

Ashwin Karangutkar
Test Engineer

Ashwin Train Asked on July 10, 2015 in Selenium WebDriver.
Add Comment
2 Answers

A good thought at this shows that is it really reuqired for the log4j properties file to be hidden in jar?

if you hide it, it will anyway be overwritten by the properties supplied by the user. And it will also reduce the log managing capabilities of your system. Lets say you dont want to capture logs.

I hope I got your question right.

Professor Answered on July 10, 2015.

Hi Virender,

Ok. Considering your thought. I decided to keep my properties file along with Jar file outside. Now the issue I am facing is I am  taking path from user during run time which decides where the log files will be stored. However the path in properties file is getting updated but the log files are getting stored on hte same path.

Have you faced any similar issue.

Your  reply would be helpful

Thank you.

on July 10, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.