Thread類的getAllStackTraces()方法獲取虛擬機中全部線程的StackTraceElement對象,能夠查看堆棧

for (Map.Entry<Thread, StackTraceElement[]> stackTrace : Thread.getAllStackTraces().entrySet()) { Thread thread = (Thread) stackTrace.getKey(); StackTraceElement[] stack = (StackTraceElement[])
相關文章
相關標籤/搜索