• 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

Access is denied

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