File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes this code is giving file not found exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "this code is giving file not found exception " Watch "this code is giving file not found exception " New topic
Author

this code is giving file not found exception

deepak bhai
Ranch Hand

Joined: Apr 22, 2011
Posts: 33
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40052
    
  28
And why do you think it is throwing such an Exception? More details here.
deepak bhai
Ranch Hand

Joined: Apr 22, 2011
Posts: 33
yes i have checked the file accesibility , system have full rights on it .. also i am running my net beans using run as administrator
Ralph Cook
Ranch Hand

Joined: May 29, 2005
Posts: 479
The most likely reason: it is not in the directory where you think it is looking. Use a full file path and see if it still gives you the error.

The second most likely reason: the filename is spelled differently in the program than the file's actual name.

rc
deepak bhai
Ranch Hand

Joined: Apr 22, 2011
Posts: 33
thanks ralph, for your valuable reply
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40052
    
  28
deepak bhai wrote: . . . using run as administrator
Why? I thought it was regarded as potentially dangerous to run ordinary code as an administrator.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: this code is giving file not found exception