Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
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

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "FileNotFoundException" Watch "FileNotFoundException" New topic


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==

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

Joined: Oct 29, 2001
Posts: 9077

A relative pathname. . . must be interpreted in terms of information taken from some other pathname. By default the classes in the 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. 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]
Have you tried LearnNowOnline?
subject: FileNotFoundException