• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EOF Exception

 
Kevin Mc Cusker
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all. I have written a simple program to read the .db file and output to the command prompt. all works fine.
Then i wrote a GUI and Database. The Gui creates an instance of the database which uses the exact same code as the simple program to read from the .db file, but i end up with an EOF Exception after the first raf.readInt().
Can anyone suggest why this is happening?
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kevin,

Are you sure they are accessing the same file?

Perhaps you could start by putting some logging messages (or even just System.out messages) in your code as it goes through the initial steps (print out the name of the file, whether it exists and is usable (File.exists(), File.canRead(), File.canWrite()), whether the RAF (or whatever you are using) was instantiated correctly, and so on.

Regards, Andrew
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic