Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to read a volume

Saul Tocsin
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am trying to read a volume via Java. I mean, in Windows terms, something like obtaining a "volume handle" so that I can read the volume from front to back.

The pertinent code looks like this:

Note also that I have added to the java.policy file these lines:

When I run the program I get the following:

Exception in thread "main" \\.\C: (Access is denied)
at Method)
at<init>(Unknown Source)
at<init>(Unknown Source)

However, when I run the Windows command shell "as administrator," it works.

Does anyone know how I might get this to work without having to run as administrator?



  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic