Solved

java - monitor the jvm heap size growth in eclipse

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

808 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