By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,806 Members | 1,380 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,806 IT Pros & Developers. It's quick & easy.

JAVA - file not found exception

P: 48
I am trying to read a file with
Expand|Select|Wrap|Line Numbers
  1. FileInputStream fstream = new FileInputStream("file1.txt");
I have placed the file exactly in the folder where the CLASS File s there. still i get an error saying "The system cannot find the file specified"

Any suggestions?
Apr 28 '12 #1
Share this Question
Share on Google+
2 Replies

P: 1
the file must be placed in "user.dir" folder.
if you are running in eclipse then its proj home dir.
May 12 '12 #2

P: 4
you should give it the project dir and file name
Jun 2 '12 #3

Post your reply

Sign in to post your reply or Sign up for a free account.