This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
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

Access is denied

 
Shan Jun Hao
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there, I just finished the part of my assignment in suncertify.db. However, when I wanted to test out the IO of the .db file, I got an error on Access is denied.

Here's the output:

C:\Documents and Settings\blahblahblah\Desktop\URLyBird
Exception in thread "main" java.io.FileNotFoundException: C:\Documents and Settings\LIM WEE TIEN\Desktop\URLyBird (Access is denied)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:98)
at suncertify.db.DataFileAccess.<init>(DataFileAccess.java:98)
at suncertify.db.Test.main(Test.java:9)
Java Result: 1

Do I need a policy file to overcome this issue?
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

It is easy java does not find your file. Try with the whole path.

Regards M
[ July 11, 2006: Message edited by: Mihai Radulescu ]
 
Shan Jun Hao
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks... my bad.

Now this is solved... more exceptions coming up! With no experience at all in I/O using java gonna take more time to debug everything
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Test First. Write copious testing code for every part of your assignment, make sure it all runs separately.

I admit my test coverage isn't what it should be, but outside my GUIs it's over 50%.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic