JVM process and Java Linux

This question can be very simple in the Java JVM. If I have a stand-alone Java program and if, for example, 5 processes of this program work at a certain time on the server, can I say that these 5 java processes work in 5 JVMs?

In the process, I mean the Linux process here. If I ps -ef |grep java , I will see 5 java processes appear.

+6
java multithreading linux jvm
source share
3 answers

Yes, that's right. There is one JVM process per java .

+10
source share

You can run the jps command (from the JDK bin folder if it is not in your path) to find out which java processes (JVMs) are running on your computer.

+4
source share

Depends on the JVM and native libraries. You can see that JVM streams are displayed with different PIDs in ps . Generally speaking, child PIDs will have parent PIDs with java processes like those that are threads.

You cannot say for sure that # from Linux java processes == from created JVM instances.

0
source share

All Articles