<$BlogRSDUrl$>

Wednesday, April 28, 2004

Pet Peeve 

One of my pet peeves with Java is RFE #4057701 (java.io.File: Need way to find free disk space.) This RFE was submitted way back in June 9th, 1997 and still won't be resolved with the release of JDK 1.5. How can something this basic be continually pushed back into later releases? It currently sits at #6 spot on the Top 25 RFE's list that Sun publishes and I believe has been on that list for several years now. For a while it looked like this issue would be resolved with JDK 1.5 via JSR-203 dubbed "NIO.2" but this JSR never made it into JDK 1.5 and the information on this JSR is rather scant.

I have found a couple of options (though I have tested neither of them so far): One is a commercial package called JConfig which supports Windows, MacOS & most Unix systems. This package seems to be quite comprehensive with a number of classes including a general DiskObject with DiskVolume, DiskFile and DiskAlias subclasses instead of a single File object like we have in Java today. Another is a free package called se.mog.io which is a simple class that extends java.io.File and adds a few methods including getDiskSpaceAvailable(). From the web page it appears that Windows and Linux are supported.

Still, a Java developer shouldn't have to purchase or acquire an add-on API in order to perform such basic functionality. Sadly, I'm willing to bet this RFE won't be resolved in time for its 8th birthday. Any takers?

This page is powered by Blogger. Isn't yours?