首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Eclipse开发 >

Eclipse 中 运用外部jar 来调试java application

2012-11-05 
Eclipse 中 使用外部jar 来调试java application1. write a java application 2. export it as jar file,

Eclipse 中 使用外部jar 来调试java application
1. write a java application

2. export it as jar file, make sure java -jar filename can run without problem

作为调试服务器
1. in the path of jar file, run following comand

java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address="8000" -jar Test_fat.jar

2. in eclipse , project, right click debug --> debug configurations

--> remote java application

connection type: sock attach, other item can use default value, at last , click debug

作为调试客户机

1. in eclipse , project, right click debug --> debug configurations

--> remote java application

connection type: sock listen, other item can use default value, at last , click debug

2. 1. in the path of jar file, run following comand

java -Xdebug -Xrunjdwp:transport=dt_socket,address=127.0.0.1:8000,suspend=y -jar Test_fat.jar

热点排行