Punter Vicky
Punter Vicky

Reputation: 16992

Java Thread & Unix Process

Will a java thread have a unique PID in UNIX environment? If I want to kill a specific thread of execution , is it possible to be done outside the program?

Upvotes: 4

Views: 261

Answers (2)

Yann Huissoud
Yann Huissoud

Reputation: 1023

Here they say Most implementations of the Java virtual machine run as a single process. A Java application can create additional processes using a ProcessBuilder object. The alternative would be spawn a process instead of a thread.

Upvotes: 3

AJNeufeld
AJNeufeld

Reputation: 8695

Oracle includes jvisualvm in the JDK\bin directory. You can use it to view threads running inside running JVM's. However, I don't see any support for terminating a thread.

Upvotes: 4

Related Questions