program in java to get info about Ram [closed]
Want to improve this question? Update the question so it focuses on one problem onl开发者_开发问答y by editing this post.
Closed 8 years ago.
Improve this questionI want a program to get information about RAM
How can i do that?
There's a couple of memory-related methods in the Runtime
class, but note that they only give information about the amount of memory available to (or used by) the JVM, not the hardware it runs on.
Generally, Java is the wrong language to do this kind of thing, since it requires access to OS APIs that Java does not provide.
Most of the information you need will be contained in the Runtime class. Have a look at the link. It should be straightforward. If you run into problems with it, I will try to help you out further.
精彩评论