?
Solved

java - monitor the jvm heap size growth in eclipse

Posted on 2013-11-02
2
Medium Priority
?
381 Views
Last Modified: 2013-11-08
Hi,

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

-Xmx1024M

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

thanks
-anshu
0
Comment
Question by:anshuma
2 Comments
 
LVL 36

Accepted Solution

by:
mccarl earned 1000 total points
ID: 39619739
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.
0
 
LVL 35

Assisted Solution

by:girionis
girionis earned 1000 total points
ID: 39620831
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.
0

Featured Post

Independent Software Vendors: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
The viewer will learn how to implement Singleton Design Pattern in Java.
This video teaches viewers about errors in exception handling.
Suggested Courses
Course of the Month17 days, 8 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question