How to install Java 8 on Mac
To install Java 8 on macOS, follow these steps:
Download the JDK 8 installer from the Oracle website: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
.dmgfile to open it.
Double-click the installer package to begin the installation process.
Follow the prompts to install JDK 8.
Once the installation is complete, you can verify that JDK 8 has been installed by opening a Terminal window and typing:
This should print the version of the JDK that is currently being used.
Note that these steps will only install JDK 8 for the current user. If you want to install JDK 8 for all users on the system, you will need to use additional steps.