0

I placed an properties file in the PROFILE_ROOT/properties folder of the WAS server. But when the application searches for the file I get a FileNotFound Exception. On the other hand, it is able to search for an existing properties file. Should anything be changed in the server once a property file has been added.

Properties properties = new Properties();

properties.load(new FileInputStream(new File("C:\\websphere\\appserver\\profiles\\appsrv01\\properties\\example.properties")));

System.out.println(properties.getProperty("en"));
user12222
  • 197
  • 2
  • 11
  • Add piece of code that shows how you are trying to open the file. – Gas Apr 01 '15 at 22:18
  • This works perfectly in my environment. Make sure that when you created your `example.properies` file it didn't have `.txt` hidden extension appended automatically. Check in `Folder options > View > Hide automatically extensions for known file types` – Gas Apr 02 '15 at 08:40
  • Thank you for helping me out. I placed the properties file on a different server than the one that my application was deployed on. – user12222 Apr 02 '15 at 19:46

0 Answers0