如何找到在ubuntu中运行的jvm的端口号


1

我如何知道Linux中jvm(Java虚拟机)的调试端口号?


您是否在谈论Java虚拟机(jvm)?如果是,您要寻找哪个端口?调试端口?
Stefan Endrullis

是Java虚拟机。是的,调试端口
代码黑猩猩,2015年

Answers:


2

我很确定默认情况下未启用调试端口。您必须通过-Xdebug参数启用它。这是一个示例,如何在启用调试的情况下以端口8000作为调试端口来启动Java:

java -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n ...

是的,这是我的解决方案:-agentlib:jdwp = transport = dt_socket,server = y,suspend = n,address = 8000
代码黑猩猩

1

根据Stefan Endrullis的建议,这是我的解决方案:

-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.