How to install Java 8 on Mac?

 

In September 2021, Java 8 has reached its end of public updates, and Oracle provides long-term support (LTS) for it only through its commercial offerings. However, you can still install and use Java 8 through other distributions like AdoptOpenJDK or OpenJDK. Here's how you can install Java 8 using AdoptOpenJDK as an example:

  1. Visit AdoptOpenJDK's Website: Go to the AdoptOpenJDK website: https://adoptopenjdk.net/.

  2. Choose Java Version: Select the version of Java you want to install. In this case, select "OpenJDK 8."

  3. Choose JVM Implementation: Choose the JVM implementation you prefer. "HotSpot" is the default choice and is widely used.

  4. Choose Operating System: Choose "macOS" as your operating system.

  5. Download and Install: Download the installation package (e.g., a .dmg file for macOS) and follow the installation instructions.

  6. Verify Installation: After the installation is complete, open your terminal and verify that Java 8 is installed by running the following command:

    sh
  1. java -version

    You should see output indicating that Java 8 is installed and its version information.

Here's an example of how the installation might look:

  1. Visit the AdoptOpenJDK website: https://adoptopenjdk.net/.

  2. Choose "OpenJDK 8."

  3. Choose "HotSpot."

  4. Choose "macOS."

  5. Download and install the .dmg package.

  6. Open the terminal and verify the installation:

    sh
java -version

Comments