Hi,
I would like to get a threadName from a threadID. I would like
something like "getThreadNameFromThreadID" in the line here:
String threadName = System.getThreadNameFromThreadID(long threadID);
It doesn't seem like this is available in java 1.4.2. Any suggestions?
Thomas Schodt - 07 Mar 2005 10:18 GMT
> I would like to get a threadName from a threadID. I would like
> something like "getThreadNameFromThreadID" in the line here:
>
> String threadName = System.getThreadNameFromThreadID(long threadID);
What is threadID?
If you can get the Thread instance from the threadID
you can use Thread.getName()
Chris Smith - 07 Mar 2005 14:34 GMT
> I would like to get a threadName from a threadID. I would like
> something like "getThreadNameFromThreadID" in the line here:
>
> String threadName = System.getThreadNameFromThreadID(long threadID);
>
> It doesn't seem like this is available in java 1.4.2. Any suggestions?
Threads do not have any assigned numerical ID numbers in Java. Where
did you get threadID from, and what is it?

Signature
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
Tor Iver Wilhelmsen - 07 Mar 2005 16:01 GMT
> String threadName = System.getThreadNameFromThreadID(long threadID);
What kind of "System" class is this? There is no such method in
java.lang.System, not even in 1.5.x.
Dotty - 07 Mar 2005 19:19 GMT
> Hi,
>
[quoted text clipped - 4 lines]
>
> It doesn't seem like this is available in java 1.4.2. Any suggestions?
String tcurrent = Thread.currentThread().getName();