TaT ProfilingMaven2AppsNB6

Profiling Maven 2 Applications in NetBeans 6

Contributed by: Andrew Harmel-Law


Reposted from this blog entry: http://the-music-of-time.blogspot.com/2008/01/profiling-maven-2-apps-in-netbeans-6.html

Tips and Tricks

I thought this might be more complicated. It wasn't. To use the Netbeans profiler with your Maven 2 project you simply need to add a single pair of parameters when running your java app. Call up the project's Maven Properties dialogue (right click the maven project > Project Properties), select the "Run" tab and add something like the following to the jvm args:

    -agentpath:"C:\Program Files\NetBeans 6.0\profiler2\lib\deployed\jdk15
\windows\profilerinterface.dll=\"C:<br>\"Program Files\"<br>\"NetBeans 
6.0\"<br>profiler2<br>lib<br>"",5140

This meant that now when I ran my app (F6) execution would wait for me to attach the profiler. Cue real-time graphy goodness. Sweet.

Also, it's useful to save that as a custom config in the properties then you can easily switch between profiled and default Run args.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo