Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 268
  • Last Modified:

Retrieving JVM information

Hello,
How do I retrieve the total amount of memory available for a running instance of the jvm, as well as the total amount of memory available for use? Basically I have an app that manages a large queue of data, and I need to know when I am running out of memory. So I figured I'd do this by getting the max size of the jvm memory and compare it to the amount of memory in use.

Worth 500 points.

Thanks,
Rick
0
richardsimnett
Asked:
richardsimnett
1 Solution
 
StillUnAwareCommented:
Since Java 1.5 use java.lang.management.MemoryMXBean
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now