首页 > 解决方案 > Java 调试器返回“系统类加载器未定义 appendToClassPathForInstrumentation 方法或方法失败”

问题描述

我在尝试调试任何文件时遇到问题。控制台弹出这个:

"C:\Program Files\Java\jdk-14.0.1\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:51080,suspend=y,server=n -javaagent:C:\Users\Błażej-PC\.IdeaIC2019.3\system\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "C:\Users\Błażej-PC\IdeaProjects\Choinka\out\production\test;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.3.4\lib\idea_rt.jar" VERSJA14TEST.Main

Connected to the target VM, address: '127.0.0.1:51080', transport: 'socket'
Unexpected error (103) returned by AddToSystemClassLoaderSearch

Unable to add C:\Users\B�a�ej-PC\.IdeaIC2019.3\system\captureAgent\debugger-agent.jar to system class path - the system class loader does not define the appendToClassPathForInstrumentation method or the method failed
FATAL ERROR in native method: processing of -javaagent failed, appending to system class path failed
Disconnected from the target VM, address: '127.0.0.1:51080', transport: 'socket'

Process finished with exit code 1

任何已知的修复?

截屏

标签: javadebuggingintellij-idea

解决方案


IDEA-236445可能就是这种情况。如果您将 IDE 系统目录重新定位到磁盘上的其他位置,路径中没有非 ASCII 符号,这应该会有所帮助,请参阅本指南


推荐阅读