I have a properties file at a certain location on my file system. In my application server (Websphere 5.1)I have set a variable in the JVM System Properties that points to the property file. These are the lines of code to access the variable
This all works fine when I test it in RAD on my local machine, but when I deploy this solution to an app server running on Unix I noticed peculiar behavior. (Btw I have setup a variable on the that server too)The first time that I try to bring up the webpage that accesses the properties file, the app server log displays a message IOException: null/properties.file (No such file or directory) This leads me to believe that System.getProperty is returning null. However, if I close the browser and open up my webpage again I'm able to access the file.
Is there something I don't know about System.getProperty? Btw getServletContext.getRealPath...etc are not options because the file is at a different location than the application.