如何在Netbeans中分析Maven应用程序?

时间:2023-01-18 20:28:37

I've got a project using Maven 2 as the build tool. Now I am using Netbeans 6 as my IDE and really want to be able to use the profiler. Is there any way I can get this to work?

我有一个使用Maven 2作为构建工具的项目。现在我使用Netbeans 6作为我的IDE,并且真的希望能够使用分析器。有什么方法可以让这个工作吗?

1 个解决方案

#1


1  

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 Properties dialogue, select the "Run" tab and add something like the following to the jvm args:

我认为这可能会更复杂。事实并非如此。要将Netbeans Profiler与Maven 2项目一起使用,您只需在运行Java应用程序时添加一对参数。调出项目的Properties对话框,选择“Run”选项卡并在jvm args中添加如下内容:

-agentpath:"C:\Program Files\NetBeans 6.0\profiler2\lib\deployed\jdk15\windows\profilerinterface.dll=\"C:\\\"Program Files\"\\\"NetBeans 6.0\"\\profiler2\\lib\\"",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.

这意味着现在当我运行我的应用程序(F6)时,执行会等待我附加探查器。提示实时图形的善良。甜。

#1


1  

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 Properties dialogue, select the "Run" tab and add something like the following to the jvm args:

我认为这可能会更复杂。事实并非如此。要将Netbeans Profiler与Maven 2项目一起使用,您只需在运行Java应用程序时添加一对参数。调出项目的Properties对话框,选择“Run”选项卡并在jvm args中添加如下内容:

-agentpath:"C:\Program Files\NetBeans 6.0\profiler2\lib\deployed\jdk15\windows\profilerinterface.dll=\"C:\\\"Program Files\"\\\"NetBeans 6.0\"\\profiler2\\lib\\"",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.

这意味着现在当我运行我的应用程序(F6)时,执行会等待我附加探查器。提示实时图形的善良。甜。