Application Server Solutions for Microsoft IIS and ASP.NET
       solutions   products   partners   company   support   downloads         store
ServletExec Self-Help: FAQ
Back to Search >  Back to Search Results

Faq ID 130
Product ServletExec
Category VM Settings
Question My Java code writes or reads a file, but the file cannot be found. Where did it go ?
Answer If you don't specify the absolute path for the file, then the JVM will use the value of the System property named
when reading or writing a file.

To get around this JVM issue, you have 3 options:
  • Use absolute paths for your files
  • append the value of the user.dir System property to the front of your filename
  • Set the user.dir System property to be what your code expects
    NOTE: this option has the potential to break other code which may be relying on the value of that property (i.e. it may result in unexpected failures/behavior), so we don't really recommend it.

company media information terms of use privacy policy contact us