I have a jar file with properties configuration file.
when I run it in Netbeans everything works as it should.
but when I run it in a cmd – the properties file is not found.
why?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It depends on how you’re loading your properties file.
Consider to load your properties with the help of:
and then use Properties.load(in)
This should handle the situation when the properties file physically resides in the jar
Good Luck!