• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to read a volume  RSS feed

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

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" java.io.FileNotFoundException: \\.\C: (Access is denied)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<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?

Thanks.

-Saul

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!