0

I'm developing a JSF application that uses a jar that I already have. This jar holds the application business logic and deals with a database. When I'm running unit tests in the jar application I could read/write/etc to the database (I have a .properties file with the database connection data).

In my JSF application I use that jar and when it needs to do some database stuff I get an "java.io.FileNotFoundException: etc\nm-hms-recipe.properties (The system cannot find the path specified) exception".

I already checked and the file is inside the jar that's is being used by my JSF application.

Sorry for my English, can anyone help? Thanks.

nmartins
  • 185
  • 2
  • 10
  • are you able to browse source of this jar? what is the exact path it looks this file under? maybe it looks for it in file system, and only tests use the file that is packed in jar – Kris Jaklik May 12 '15 at 21:46
  • Yes. I have a folder named etc and the file is there. Like: myjar.jar/etc/myfile.properties. If I 'explore' the jar that is imported in my JSF app (in eclipse) the .properties file is there... – nmartins May 12 '15 at 21:51
  • 1
    How are you loading the file? Can you post the part of the code you use to access the file? – Jon C May 12 '15 at 23:46

0 Answers0