报错信息如下:
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
ERROR: transport error 202: handshake failed - connection prematurally closed
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:750]
解决方案:
在/etc/hosts文件中加入下面一行内容
127.0.0.1 localhost.localdomain localhost
遇到这种问题按如下步骤去检查:
1、设置host:127.0.0.1 localhost;
2、设置MyEclipse的debug端口,看是否与tomcat的debug端口一致;
3、查看是否有其他运行的进程占用了debug端口;
4、配置防火墙,允许 javaw.exe访问网络。