Link to home
Start Free TrialLog in
Avatar of richardsimnett
richardsimnett

asked on

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
Avatar of StillUnAware
StillUnAware
Flag of Lithuania image

Since Java 1.5 use java.lang.management.MemoryMXBean
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial