Install Java Environment
Download and Install OpenJDK
Install OpenJDK via the package manager
macOS
Linux
Check whether the Java environment is installed successfully
java -version
in the terminal. If the Java or OpenJDK version number can be displayed correctly, the installation is successful.