Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JVM and Java Linux process

This question may be very basic about Java JVM. If I've a Java standalone program and if, for example, 5 processes of this program are running at a particular time in the server, can we say that these 5 java processes are running in 5 JVMs?

By process, I mean the Linux process here. If I execute ps -ef |grep java, I'll see 5 java processes showing up.

like image 334
Gnanam Avatar asked Nov 29 '10 07:11

Gnanam


2 Answers

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

like image 139
Matthew Flaschen Avatar answered Nov 15 '22 06:11

Matthew Flaschen


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

like image 37
CruiZen Avatar answered Nov 15 '22 05:11

CruiZen