对于在 linux 上运行的 JDK 14 应用程序,添加以下 JVM 参数
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
导致以下错误
Starting Main...
ERROR: transport error 202: socket creation failed: Address family not supported by protocol
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [open/src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c:734]
将地址从更改*:5005
为localhost:5005
似乎可行,但它只绑定到本地主机。我知道一个适用*:5005
于 JDK 12 的事实,但我找不到关于此的任何更改,事实上 JPDA 规范仍然提到了*
jse 14 https://docs.oracle.com/en/java/javase/14/的选项docs/specs/jpda/conninv.html。有人知道我可以调查什么吗?它是我似乎无法找到文档的错误还是功能。