aspose file tools*
The moose likes I/O and Streams and the fly likes FileNotFoundException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "FileNotFoundException" Watch "FileNotFoundException" New topic
Author

FileNotFoundException

lokesh rajarathnam
Ranch Hand

Joined: May 17, 2007
Posts: 35
hi all

I had problem in loding the xml file in to the server.

==The properties file==
xmlsource=projectname/webcontent/myfile.xml

i save the xml file in projectname/webcontent/myfile.xml

while i run the project i got the error FileNotFoundException: D:\jboss-4.2.0.GA\bin\projectname\webcontent\myfile.xml
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8971
    
    9

A relative pathname. . . must be interpreted in terms of information taken from some other pathname. By default the classes in the java.io package always resolve relative pathnames against the current user directory. This directory is named by the system property user.dir, and is typically the directory in which the Java virtual machine was invoked.

java.io.File JavaDoc

I'm a fan of providing a system property which points to a configuration file. You can also find the deploy directory from the Servlet API if you're using that.


[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: FileNotFoundException