This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes reading an integer from a file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "reading an integer from a file" Watch "reading an integer from a file" New topic
Author

reading an integer from a file

unyime inok
Greenhorn

Joined: Oct 13, 2004
Posts: 29
Why i'm i getting this errors?
Java.io.FileNotFoundException:File.dat(The system cannot find the file specified )
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at ReadInteger.<init>(ReadInteger.java:27)
at TestFile.main(TestFile.java:14)


Here's my code:

[ November 02, 2004: Message edited by: Joel McNary ]
Joel McNary
Bartender

Joined: Aug 20, 2001
Posts: 1815
Where is your File.dat file located? It seems to me that the file is not being found. Try specifying an absolute path name to the file.


Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Are you running this within an IDE? If so which?


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: reading an integer from a file
 
Similar Threads
standard deviation
ArrayIndexOutOfBounds help!
why is my calstandardDev() returning 0?
reading integer from a file
please help figure out why the standard deviaion is not giving the correct output