Click to See Complete Forum and Search --> : Reading available memory from OS
shoenigman
July 30th, 2003, 08:09 PM
I am still working on my replica of the Windows Calculator using Java and need to be able to read the "physical memory available to Windows" from the local OS. This information is needed on the About Calculator screen (selected from the Help menu). I would greatly appreciate any help with locating this information. Once again, thanks in advance for your assistance...
ArchAngel
July 31st, 2003, 05:15 AM
It can't be done without using JNI or using a native program whose results are obtained using a Runtime.exec().
EToporov
August 4th, 2003, 03:24 AM
WinPack for JNIWrapper can help you with this task easily.
http://www.jniwrapper.com/winpack.jsp
Check the API documentation: http://www.jniwrapper.com/docs/javadoc/winpack/com/jniwrapper/win32/system/MemoryStatus.html
Hope this helps,
EToporov
ArchAngel
August 4th, 2003, 04:20 AM
You can find out some memory information:
http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html#totalMemory()
http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html#maxMemory()
Not quite what you want...
shoenigman
August 4th, 2003, 09:40 AM
Thank you both for your help. I think I am close to solving this, but you never know. It is a lot of work for such a little task. It is almost not worth it...
codeguru.com
Copyright WebMediaBrands Inc., All Rights Reserved.