To install Java on MacOS you need to go to the official Oracle download page and click on the major version of Java (currently the newest version is Java SE 11.0.2 LTS)
.Accept a license agreement and click on jdk-9.0.4_osx-x64_bin.dmg.
When downloading is finished launch dmg file and double-click on the icon.
Java installer introduction window will be opened.
So Java is successfully installed and ready to use.
To check Java version you need:
- Open Launchpad
- Find and open Terminal
- Type java -version
| || |
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)