Strong Root

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
ThreadGroup rootGroup = Thread.currentThread().getThreadGroup();
ThreadGroup parentGroup;
while ((parentGroup = rootGroup.getParent()) != null) {
    rootGroup = parentGroup;
}
 
Thread[] threads = new Thread[rootGroup.activeCount()];
while (rootGroup.enumerate(threads, true== threads.length) {
    threads = new Thread[threads.length * 2];
}
 
for (Thread t : threads) {
    if (t.getId() == targetID) {
        /* found it */
    }
}
cs






출처 :

http://stackoverflow.com/a/1323480

http://stackoverflow.com/a/6668121