private void printThreadStatus(Thread thread) { StackTraceElement[] frames = thread.getStackTrace(); System.err.println(thread.getName() + ": " + thread.getState()); for (StackTraceElement frame : frames) { System.err.println(frame); } System.err.println(); }