public class PrintThreads
extends java.lang.Object
To get a stack trace for each thread:
Under Unix, try kill -3 pid
, where
pid
is the process id from ps
.
Under Windows, try Ctrl-Break
.
Constructor and Description |
---|
PrintThreads() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
allThreadGroups()
Return a String containing all the ThreadGroups in the JVM
that are descendents of the root ThreadGroup.
|
static java.lang.String |
allThreads(boolean indicateEventDispatchThread)
Return a string containing all the threads in the JVM
who are members of ThreadGroups which are descendants of the
root ThreadGroup.
|
static java.lang.ThreadGroup |
rootThreadGroup()
Get the root ThreadGroup of the Java Virtual Machine.
|
static java.lang.String |
toThreadDescription(java.lang.Thread thread)
Return a user friendly description of the thread.
|
public static java.lang.ThreadGroup rootThreadGroup()
public static java.lang.String allThreadGroups()
public static java.lang.String allThreads(boolean indicateEventDispatchThread)
indicateEventDispatchThread
- true if we should indicate
which thread is the Swing Event Dispatch Thread.public static java.lang.String toThreadDescription(java.lang.Thread thread)
thread
- The thread