用JDK自带的监控工具jconsole来监控程序运行 工具目录:C:Program FilesJavajdk1.6.0_06injconsole.exe 效果如下:监控类ThreadPoolExecutorTest 的运行 选择我们运行的程序,然后监控运行状态: