Portable way of finding total disk size in Java (pre java 6)
<p>I need to find the total size of a drive in Java 5 (or 1.5, whatever). I know that Java 6 has a new method in java.io.File, but I need it to work in Java 5.</p>

<p>Apache Commons IO has org.apache.commons.io.FileSystemUtils to provide the <em>free</em> disk space, but not the total disk space.</p>

<p>I realize this is OS dependant and will need to depend on messy command line invocation. I'm fine with it working on "most" systems, i.e. windows/linux/macosx. Preferably I'd like to use an existing library rather than write my own variants.</p>

<p>Any thoughts? Thanks.</p>
