Java Thread & Unix Process

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

+4
source share
2 answers

Oracle includes jvisualvmthe JDK \ bin directory. You can use it to view threads running inside the JVM launch. However, I do not see support to complete the flow.

+4
source

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.So, following this, it seems that you cannot without vm intervention. An alternative would be to create a process instead of a thread.

+3
source

Source: https://habr.com/ru/post/1658134/


All Articles