How do I find a running Java virtual machine on my computer?

I want to know which JVM I am using when I run a java program from the command prompt

Is there a CMD command that can perform this operation?

Solution

Running Java - version will tell you which Java binary is in the path This will be the binary used by any application executed using "Java - jar..." or similar

C:\>java -version
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b17)
Java HotSpot(TM) Client VM (build 23.25-b01,mixed mode,sharing)

On UNIX - based systems, you can try "which java to use" to see the binaries in use On windows, you must infer from the given version or manually check the% path% environment variable

Note that some Java applications are executed through shell scripts and may contain the absolute path of the Java binary (which may not match the first Java binary on the path)

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>