➜ /usr/libexec/java_home -V
![](https://i0.wp.com/www.linuxcommands.site/wp-content/uploads/2019/06/image-25.png?fit=900%2C163&ssl=1)
The red box area shows the JDK version and installation directory installed on the current mac.
The last line indicates the JDK version used by default.
➜ /usr/libexec/java_home -V
The red box area shows the JDK version and installation directory installed on the current mac.
The last line indicates the JDK version used by default.