title: Is there any way to get total RAM memory in use by Java through all JVMs
body: <p>Is there any standard way to get the size of total memory in use by java?    </p>
  
  <p>I found this answer in stackoverflow:<br>
  <a href="https://stackoverflow.com/a/4335461/5060185">https://stackoverflow.com/a/4335461/5060185</a>  </p>
  
  <p>But, the <code>com.sun.*</code> packages are not available in all JVMs.  </p>