远程调试Java应用程序 [英] Remote debugging Java application

查看:134
本文介绍了远程调试Java应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试通过eclipse远程调试java应用程序时,我收到以下消息。
无法连接到远程虚拟机,拒绝连接。
什么可能是错误?

解决方案

您需要使用适当的选项调用要调试的进程,例如

  -Xdebug -Xrunjdwp:transport = dt_socket,server = y,suspend = n,address = 1044 

(如有必要,用相应的端口替换),并且听起来像虚拟机没有在配置的端口上侦听。您可以使用 netstat / a 确认虚拟机是否在该端口上侦听(或 telnet


I am getting the following message when I try to remote debug a java application through eclipse. "Failed to connect to remote VM. Connection refused." What could be the error?

解决方案

You need to invoke the process to be debugged with the appropriate options e.g.

-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044

(substitute with the appropriate port if necessary) and it sounds like the VM isn't listening on the configured port. You can use netstat /a to confirm if the VM is listening on that port (or telnet)

这篇关于远程调试Java应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆