File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

System.getProperty returns null value

 
Kathy Griffin
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic