Mac view the installed jdk version and jdk installation directory

table of Contents

View the installed jdk version number and virtual machine version number

View the jdk installation directory


 

View the installed jdk version number and virtual machine version number

java -version

You can see that it is a 64-bit HotSpot VM. On April 27, 1999, Java HotSpot Virtual Machine (HotSpot for short) was officially released, and since the JDK1.3 version released after that, HotSpot became the default virtual machine of Sun JDK.

 

View the jdk installation directory

/usr/libexec/java_home -V

Note ⚠️: V is a capital letter

Most JAVA HOMEs are in the /Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home path

 

The commonly used tools we usually use to view the internal information of the JVM are in the $JAVA HOME/bin directory. (The screenshot of Home/bin is as follows)

For example, commonly used Java commands for viewing program memory usage: jmap, jhat, jstat, jstack, etc.

You can refer to this article of mine: https://blog.csdn.net/kqZhu/article/details/107495058

Guess you like

Origin blog.csdn.net/kqZhu/article/details/113125614