Failed to connect to remote VM

本文介绍了两种在Eclipse中调试Tomcat应用的方法。一种是通过修改配置文件catalina.bat和startup.bat来启用远程调试;另一种是通过GUI界面进行配置,包括设置Java选项和启动参数。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

转自网址: http://borderjs.blogspot.com/2007/04/eclipes-tomcat-debugfailed-to-connect.html

 

方法一: 修改配置文件catalina.bat , startup.bat
1. 在环境变量中添加 jpda_address=8000, 也可以加到 startup.bat 文件 @echo off下面如:set jpda_address=8000
2.
打开catalina.bat,在文件中找到" set JPDA_TRANSPORT ",把它的值设为dt_socket
3.
打开startup.bat, 在文件中找到"call "%EXECUTABLE%" start %CMD_LINE_ARGS% ",
改为" call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS% ",
也就是在start前加jpda .
4. 在eclipse debug中选择" Remote Java Application " ,新建一个批port为jpda_address的值 ,

方法二: 通过GUI的"
Configure Tomcat ".
b) Select the Java tab
c) Into the Java Options include (substituting the correct locations)
-Xdebug
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
-Dcatalina.home=c:/tomcat
-Djava.endorsed.dirs=c:/tomcat/common/endorsed
-Djava.io.tmpdir=c:/tomcat

NB: These are all on separate lines, with a <CR> at each EOL
d) Select the Startup tab
e) Into the Arguments section include:
jpda
start

NB: These are all on separate lines, with a <CR> at each EOL
其中要注意<CR>

参考:
Failed to connect to remote VM. Connection refused
http://forum.java.sun.com/thread.jspa?threadID=752624

Debugging with Tomcat and Eclipse using jpda
http://www.eaves.org/blog-archive/000246.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值