`
隐形的翅膀
  • 浏览: 484979 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

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

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics