Solved

java - monitor the jvm heap size growth in eclipse

Posted on 2013-11-02
2
357 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 35

Accepted Solution

by:
mccarl earned 250 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 250 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

705 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now