Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

running sampleproject.db.DosClient code from SCJD book

 
Dmitri Christo
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good afternoon everyone,

I am getting ready to sign up for the SCJD and currently trying to test (and learn) the non-gui part of the sampleproject, downloaded from the apress website. The classes compile with no errors in eclipse, but when trying to run the DosClient I get following exception:



I could be wrong, but I suspect this doesn't have to do with the code itself, rather than with the workspace permissions instead? I mean could I have setup my eclipse environment badly? In any case I hope this is the right place to post this. Please let me know if you encountered something similar to this and managed to work around it.

The locations above point to these lines from the code:

(DosClient.java:60) DBClient db = new DvdDatabase();
(DvdDatabase.java:54) this(System.getProperty("user.dir"));
(DvdDatabase.java:69) database = new DvdFileAccess(dbPath);
(DvdFileAccess.java:94) database = new RandomAccessFile(suppliedDbPath, "rw");

Many thanks.
 
Alex Belisle Turcot
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

could it be that your file and/or directory are read-only ?

Regards,
Alex
[ December 17, 2007: Message edited by: Alex Belisle Turcot ]
 
Dmitri Christo
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Alex, problem is actually solved. Fell for the common mistake of pointing to a folder instead of the actual file.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic