Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

reading an integer from a file

 
unyime inok
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you running this within an IDE? If so which?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic