1

There are a lot of java profilers out there, any recommendations as to what would be best for profiling a java web start application that is being deployed to glassfish inside a war?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Casey
  • 12,070
  • 18
  • 71
  • 107
  • What are you looking to profile? Memory, cpu time, object allocation, etc, this will help to narrow down what tools(free or otherwise) may be available. – broschb Dec 09 '09 at 18:02
  • I think in my context, it would make more sense to focus on memory usage. – Casey Dec 11 '09 at 13:07

2 Answers2

5

Well, the traditional answers for such a question are VisualVM and/or Yourkit (if you have money).

If you go for VisualVM, this thread will help you to configure your Webstart application for JMX.

If you go for Yourkit, have a look at this discussion.

Pascal Thivent
  • 562,542
  • 136
  • 1,062
  • 1,124
  • 1
    You don't need JMX to run for visualvm to be able to connect if running on the same machine, only across the network. – Thorbjørn Ravn Andersen Dec 09 '09 at 17:00
  • 3
    I actually used the VisualVM tool that is packaged with the JDK. It is in the bin directory and called jvisualvm.exe. When running the web start application with java6, you have to turn off class sharing. I used the following command line to get it to work correctly with visualvm javaws -J-Xshare:off app.jnlp otherwise visualvm will crash. Thanks for the recommendation! – Casey Dec 14 '09 at 15:37
  • @Casey Thanks for the Xshare flag tip! My web start application was not showing up in VisualVM on Linux. Starting the web start app with the Xshare:off flag fixed this problem! – nhylated Apr 26 '13 at 23:29
0

Here's a quick-and-dirty but simple, free, and effective way. It's language-agnostic, and the way it works is explained here.

Community
  • 1
  • 1
Mike Dunlavey
  • 40,059
  • 14
  • 91
  • 135