| Author |
How to access HD info like, size, free space..?
|
Bruno Frascino
Ranch Hand
Joined: Jul 22, 2003
Posts: 55
|
|
Hi, I would like to know if is possible to access HD info, like size, free space, and, wich package, or class from API I have to use for this!? Thanks for any help! Sorry about my english!
|
--BJCK--
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24057
|
|
|
Java doesn't offer any access to this kind of information. You'd have to execute an external program, or use native methods.
|
[Jess in Action][AskingGoodQuestions]
|
 |
Bruno Frascino
Ranch Hand
Joined: Jul 22, 2003
Posts: 55
|
|
Ok! Thanks Ernest!
|
 |
Bruno Frascino
Ranch Hand
Joined: Jul 22, 2003
Posts: 55
|
|
Hi, About the last question... Why java cannot access this kind of information?!
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24057
|
|
In general, Java doesn't have APIs to access things that are intrinsically platform-dependent. Some things that run Java don't have disks, for example, and different OS's treat even the seemingly basic notion of "free space" very differently. Frankly, though, personally I think this is a weak excuse, and you could make a pretty good case as to why there should be an API for volume info like this.
|
 |
 |
|
|
subject: How to access HD info like, size, free space..?
|
|
|