Netbeans 分析器不适用于 JDK 17

发布于 2025-01-17 13:39:28 字数 993 浏览 6 评论 0原文

当我尝试在我的Web应用程序上运行Profiler时,Netbeans告诉我,我需要先运行校准。所以我去工具>选项> Java> Profiler>一般>管理校准数据并进行校准。

之后开始进行分析,我在控制台中看到了跟随:

ant -f /home/codyline/myApp -Dnb.internal.action.name=profile -Ddirectory.deployment.supported=true 
-DforceRedeploy=false -Dnb.wait.for.caches=true "-Drun.jvmargs.ide= -agentpath:/home/codyline/netbeans/
netbeans-13/netbeans/profiler/lib/deployed/jdk16/linux-amd64/libprofilerinterface.so= 
/home/codyline/netbeans/netbeans-13/netbeans/profiler/lib, 5140,10 -XX:+HeapDumpOnOutOfMemoryError 
-XX:HeapDumpPath=/home/codyline/myApp/nbproject/private/profiler" 
-Dbrowser.context=/home/codyline/myApp profile

profile:
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Starting Payara Server 5.2022.1
Payara Server 5.2022.1 is running.

什么也不会发生! 因此,Netbeans正在尝试使用我的机器上未安装的JDK 16。
我需要与JDK 17进行分析。
注意:Netbeans 12.6的同样问题。

我该如何解决?谢谢

When I try to run the profiler on my web app, netbeans tells me I need to run a calibration first. So I go to Tools > Options > Java > Profiler > General > Manage Calibration Data and do the calibration.

Starting profiling afterwards I see following in the console:

ant -f /home/codyline/myApp -Dnb.internal.action.name=profile -Ddirectory.deployment.supported=true 
-DforceRedeploy=false -Dnb.wait.for.caches=true "-Drun.jvmargs.ide= -agentpath:/home/codyline/netbeans/
netbeans-13/netbeans/profiler/lib/deployed/jdk16/linux-amd64/libprofilerinterface.so= 
/home/codyline/netbeans/netbeans-13/netbeans/profiler/lib, 5140,10 -XX:+HeapDumpOnOutOfMemoryError 
-XX:HeapDumpPath=/home/codyline/myApp/nbproject/private/profiler" 
-Dbrowser.context=/home/codyline/myApp profile

profile:
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Starting Payara Server 5.2022.1
Payara Server 5.2022.1 is running.

And nothing happens!
So Netbeans is trying to use JDK 16 which is not installed on my machine.
I need to do the profiling with JDK 17.
NOTE: same problem with Netbeans 12.6.

How can I fix this? Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

软糖 2025-01-24 13:39:28

它接缝了您在AMD64体系结构上使用Linux。当您的Java_home环境变量指向错误目录时,可能会发生这种情况。

echo $JAVA_HOME # this command shows your java version

如果不是JDK 17,请使用此链接更改变量如何在Linux中为所有用户设置Java_home

It seams you are using Linux on amd64 architecture. This can occur when your JAVA_HOME environment variable is pointing wrong directory.

echo $JAVA_HOME # this command shows your java version

If it is not JDK 17, use this link to change the variable How to set JAVA_HOME in Linux for all users

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文