When starting a Java application through the command line, the system uses the default JDK. There can be multiple JDKs installed on the macOS system. You can determine which version of the JDK is the default by entering java -version in a Terminal window.
When you install Oracle Java on your Mac (Lion and above), Java will be enabled by default. If you are running a Java application in the browser, you will need to also check that Java is enabled in your browser.
This blog post will guide you through the process of installing the Java Runtime Environment on a Mac, explain its usage, cover common practices, and provide best practices to ensure a smooth experience.