Solved

java - monitor the jvm heap size growth in eclipse

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

895 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

13 Experts available now in Live!

Get 1:1 Help Now