• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 385
  • Last Modified:

java - monitor the jvm heap size growth in eclipse


In my java program I am getting out of memory exceptions. I do pass the JVM arguments and I am passing on my 8 GB RAM windows machine while debugging the program


Is there a way I can monitor the JVM Usage gorwth while the code is running in eclipse

2 Solutions
mccarlIT Business Systems Analyst / Software DeveloperCommented:
Probably the first step that I would try is to use the JDK supplied tools to monitor this. In the JDK's bin folder you should find "jconsole" which if you start this after your program is running, you should see a list of JVM's running, one of which is your app. You can connect to this and jconsole will give you a view of the memory usage along with other info, thread count, classes loaded, etc.

Hopefully, jconsole gives enough info, but if not you would then probably need to go further, looking at memory profilers and the like. But they are more complex to get going.
If jconsole does not give you enough information you can use yourkit (in my opinion it's the best profiler I've used so far). It costs money but there is also a free trial period.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

7 new features that'll make your work life better

It’s our mission to create a product that solves the huge challenges you face at work every day. In case you missed it, here are 7 delightful things we've added recently to monday to make it even more awesome.

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