Physical Memory Info.

How can we get the physical memory size and how much memory available?P.S. I am not looking for the JVM sizes.Thanks,
[138 byte] By [BinaryDecimala] at [2007-11-27 1:31:27]
# 1
What about [url= http://java.sun.com/javase/6/docs/api/java/io/File.html#getFreeSpace()]getFreeSpace[/url] and the similar getTotalSpace and getUsableSpace?
DrLaszloJamfa at 2007-7-12 0:34:14 > top of Java-index,Java Essentials,Java Programming...
# 2
getFreeSpace won't work if the OP wants RAM, not disk. For that I guess you could Runtime.exec df ...
tsitha at 2007-7-12 0:34:14 > top of Java-index,Java Essentials,Java Programming...
# 3
Sorry for the confusion. Yes I want the RAM info. and not the hard disk.
BinaryDecimala at 2007-7-12 0:34:14 > top of Java-index,Java Essentials,Java Programming...
# 4

I tried the Runtime.exec..("systeminfo"). It gives all kind of info about the syste. However, I need to go through the stream of the command out put and look for the words, let's say, "Totol Memory Size" and check the digits after that. This way if the "systeminfo" command changes my code won't work any more. I wonder if there another way like using a dll or any other native calls.

BinaryDecimala at 2007-7-12 0:34:14 > top of Java-index,Java Essentials,Java Programming...