• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

running sampleproject.db.DosClient code from SCJD book

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic