This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes How to get the free space of Hard Disk Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to get the free space of Hard Disk" Watch "How to get the free space of Hard Disk" New topic
Author

How to get the free space of Hard Disk

Jeffy Yang
Greenhorn

Joined: Mar 07, 2002
Posts: 2
I wonder if there is a way to get the free space of Hard Disk using JDK API. Any suggestion will be appreicated. thank you in advance.
John Spindler
Greenhorn

Joined: Feb 12, 2002
Posts: 28
you can do it with this:
http://www.tolstoy.com/samizdat/jconfig.html
it's not core API but it will do the trick.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I am sure that those classes are very good, however, I would remember that JConfig is written in JAVA therefore, you should still be able to do anything that JConfig does without JConfig. On the other hand, maybe that would be pointless if someone else has done the job for you. But the way Jconfig advertises their product is that it access some low level system information that can't be reached with the core JAVA API classes. Fooy, how did they do it then. Plus, there is no such thing as low level java. Unless you are using JNI and some other language mixed with JAVA, JAVA still sits at a super high level on top of the OS. Don't be fooled. Be smart.


GenRocket - Experts at Building Test Data
John Spindler
Greenhorn

Joined: Feb 12, 2002
Posts: 28
Originally posted by Gregg Bolinger:
you should still be able to do anything that JConfig does without JConfig. On the other hand, maybe that would be pointless if someone else has done the job for you.

I agree! dont' reinvent the wheel but if you want to know how they do it you can download the source to Jconfig right off they're site.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to get the free space of Hard Disk