1. Preface:
In MacOS 10.13, the JRE is not found by default.
>
ls/library/java/javavirtualmachines/
The directory is empty.
2. Installing the JRE
: https://java.com/zh_CN/download/
Package JRE-9.0.4_OSX-X64_BIN.DMG, directly double-click to load the installation.
Installation path:/library/internet\ plug-ins/javaappletplugin.plugin/contents/home/
Test run:
> /library/internet\ plug-ins/javaappletplugin.plugin/contents/home/bin/java-version
Java Version "9.0.4"
Java (TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot (TM) 64-bit Server VM (build 9.0.4+11, Mixed mode)
3. Installing the JDK
Ibid.
Package: JDK-9.0.4_OSX-X64_BIN.DMG, double-click Load installation.
Installation path:/library/java/javavirtualmachines/jdk-9.0.4.jdk/contents/home/
Test run:
Java-version
Java Version "9.0.4"
Java (TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot (TM) 64-bit Server VM (build 9.0.4+11, Mixed mode)
Installing JRE and JDK 9.0 in MacOS 10.13