To check the version of Java installed on your Mac, you can use the java -version
command in a terminal.
To open a terminal on your Mac, go to the Applications folder, then the Utilities folder, and double-click on Terminal. Alternatively, you can use the Spotlight
search feature to find the Terminal app.
Once the terminal is open, type java -version
and press Enter
. This will print the version of Java that is currently being used by the system.
If you have multiple versions of Java installed on your Mac, you can use the /usr/libexec/java_home
command to list all of the installed versions. For example:
/usr/libexec/java_home -V
This will print a list of all of the installed Java versions, along with their corresponding locations.