英文:
Cannot start Java Flight Recorder or attach Java Mission Control
问题
我之前在旧版本的Java中已经在使用Java Flight Recorder,但从命令行启动的命令已经发生了变化。
现在我想要从Java Mission Control(7.1.2+b04)开始记录我的Java 14(14.0.2)应用程序的飞行记录。但是在JMC中,当我点击运行的JVM *开始飞行记录...*时,会抛出错误:
当我添加-Dcom.sun.management.jmxremote --add-exports=jdk.management.agent/jdk.internal.agent=ALL-UNNAMED
来运行应用程序时,Java应用程序不会启动,并抛出以下错误:
管理代理初始化失败:找不到类jdk.internal.agent.Agent。
当我添加-XX:StartFlightRecording=name=JMC_Default,maxsize=100m
时,也不会启动:
超接口检查失败:类com.sun.proxy.jdk.proxy1.$Proxy14(在模块jdk.proxy1中)无法访问类org.objectteams.IBoundBase2(在未命名模块@0x2ff4acd0中),因为模块jdk.proxy1不读取未命名模块@0x2ff4acd0
VM初始化过程中发生错误
启动JFR on_create_vm_3时发生故障
我不知道该如何继续,因为我无法add-reads
运行时生成的代理模块。
英文:
I was already using Java Flight Recorder with older Java versions, but the the commands to start from command line have changed.
Now I want to start flight recording my Java 14 (14.0.2) application from Java Mission Control (7.1.2+b04). But in JMC an error is thrown as soon as I click on the running JVM Start Flight Recording...:
When I add -Dcom.sun.management.jmxremote --add-exports=jdk.management.agent/jdk.internal.agent=ALL-UNNAMED
to run the application the Java application does not start and throws the folling error:
Management agent initialization failure: class jdk.internal.agent.Agent not found.
When I add -XX:StartFlightRecording=name=JMC_Default,maxsize=100m
it does also not start:
superinterface check failed: class com.sun.proxy.jdk.proxy1.$Proxy14 (in module jdk.proxy1) cannot access class org.objectteams.IBoundBase2 (in unnamed module @0x2ff4acd0) because module jdk.proxy1 does not read unnamed module @0x2ff4acd0
Error occurred during initialization of VM
Failure when starting JFR on_create_vm_3
I have no idea how to proceed, as I cannot add-reads
the runtime generated proxy module.
专注分享java语言的经验与见解,让所有开发者获益!
评论