`

Failed to connect to remote VM

阅读更多

作者: Border | 发表于: 2007-04-04 4/04/2007 02:02:00 下午
可以任意转载, 转载时请务必以超链接形式标明文章原始出处和作者信息及本声明
网址: 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

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics