Java 1.6 introduced the getFreeSpace() method that shows the remaining disk space in bytes. For those that want to know how to get the unallocated disk space I've written a demo here (sourcecode included)
http://www.engineeringser...8/17/java-free-diskspace/getFreeSpace()
Returns the number of unallocated bytes in the partition named by this abstract path name.
Output:Java free diskspace demo
c:\ 111,79 Gb total 13,39 Gb left
d:\ 0,00 Gb total 0,00 Gb left
e:\ 0,00 Gb total 0,00 Gb left
f:\ 0,00 Gb total 0,00 Gb left
g:\ 0,00 Gb total 0,00 Gb left
h:\ 0,48 Gb total 0,01 Gb left