The Artima Developer Community
Sponsored Link

Java Answers Forum
How to get RAM size?

1 reply on 1 page. Most recent reply: Jan 29, 2007 12:32 PM by Ganesh Math

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Vandana More

Posts: 3
Nickname: tai
Registered: Nov, 2006

How to get RAM size? Posted: Jan 29, 2007 1:35 AM
Reply to this message Reply
Advertisement
Hi all,
how can i get(in java)total RAM size,how much currently system is using and how much is free?
please help.
Thanks in advance.


Ganesh Math

Posts: 1
Nickname: ganeshmb
Registered: May, 2005

Re: How to get RAM size? Posted: Jan 29, 2007 12:32 PM
Reply to this message Reply
java.class.Runtime is the key class to get this kind of information. However, in this class, I don't think there is any direct way to get the information you are looking for. (You can get the JVM's total memory usage though). You can invoke some OS-specific utilities using Runtime.getRuntime().exec()("command-name") to get access to the info you are looking for.

Flat View: This topic has 1 reply on 1 page
Topic: How to get RAM size? Previous Topic   Next Topic Topic: Rotating a point

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use