Am 2 Nov 2006 02:06:22 -0800 schrieb kathirvel.com@gmail.com:
> Hi,
> How to find the total memory space and free space available
> in RAM. and how to find the used and free space available in a Disk?
> If there is any code please do provide me...
As for RAM, in old Java 1.3 code I did it this way:
Runtime rt = Runtime.getRuntime();
long free = rt.freeMemory();
long total = rt.totalMemory();
long used = rt.totalMemory() - rt.freeMemory();
double utilization = (double) used / (double) total;
I believe in 1.5 there may be other ways.
-- Sebastian