views:

48

answers:

3

Hey,

I have a Java desktop application I wrote, and I would like a recommendation about a monitoring application that can spot bottlenecks in the code and real time memory consumptions.

As I was developing for J2Me, the WTK then, had a memory monitor, and I found it really useful, I would like to know which monitoring program you think is best to use.

Thanks, Adam.

Update:

I looked at the JConsole, it does not strike me as something amazing, but it does give me the data it need, not at the rate I would like and since the GC happens in between the refresh I cannot really see the application performance is there another tool something good and useful that you can recommend?

Another related question, how do I know that the performance of my application is good enough?

I'll explain, I've been asked to design my VoIP to manage 100 simultaneous calls, so I must make sure there are no memory leaks and that the application perform smoothly, other wise it would very quickly terminate. how can I check in the early stages of the application development, that I don't mess up?

Thanks again, Adam.

+2  A: 

For monitoring, jconsole, which comes bundled with your JDK, is a good start

While your desktop app is running, launch jconsole, and you should be able to see your app listed as a local process. Select it, connect, and take it from there.

To discover bottlenecks though, you might want to use a profiler. I have used JProfiler with good results, but it is not free (besides a 10 day evaluation period, which might be enough for your needs).

Lauri Lehtinen
thanks, will look into it.
TacB0sS
+1  A: 

If your SDK is recent enough, it probably includes an application called Java VisualVM which is pretty nice. Look for bin/jvisualvm.exe.

Jules Olléon
much much better thanks
TacB0sS
A: 

I personally use JProfiler. I benefited from it so much that I wrote a full blog entitled Should you use a Code Profiler? in which I show concrete examples of how you can benefit from code profiling (in this case using JProfiler).

Stephane Grenier