Hello, How can i get the process ID that would be allocated by the JVM to any particular thread ? ie i've a java thread which invokes another thread and the INVOKING thread need to know the PROCESS ID of INVOKED thread. That means the invoked thread should return its own process id to the thread that invoked it. is there any direct method in Java like getProcessID() which can directly return the current thread's process ID or is there any other way thru which i can know this...??? Its urgent. Thanks in adv. Meghana
Hi Meghana, Threads for a single VM all run in the same process space so their PID will be that of the java interpreter that starts the VM. I don't know of any method that will return the PID although the Process class probably should. It would be a simple matter to write some native code to do it, but of course that would not be a platform independant solution. Michael Morris
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
What are you doing? You are supposed to be reading this tiny ad!