1. java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000 -jar test.jar
2.会出现Listening for transport dt_socket at address: 8000,然后在Eclipse中加上断点,右击项目->Debug As->Debug Configurations,双击Remote Java Application,Connection Type选择Standard (Socket Attach),填好远程主机和端口号,单击Debug就可以远程调试了;