Search code snippets, questions, articles...

Check if the Java JDK is installed on Mac

In this post, we will explain how to check if Java JDK is installed on your MAC or not.

Check if the Java JDK is installed on Mac

To check if the Java JDK (Java Development Kit) is installed on your Mac, follow these steps:

  1. Open the Terminal app on your Mac. You can find it in the Applications > Utilities folder or by using the Spotlight Search.
  2. In the Terminal window, type the following command and press Enter:
javac -version

If Java is installed on your Mac, you should see a message displaying the version of Java that is installed. If Java is not installed, you will see an error message indicating that the "javac" command is not recognized.

Alternatively, you can also check if Java is installed by going to System Preferences > Java. If Java is installed, you should see a Java icon in the System Preferences window. You can also check the version of Java by clicking the "About" button in this window.

Was this helpful?
Programming Feeds
Learn something new everyday on Devsheet