Skip to content

Install Java

You should already have Java installed, but if you don’t because you’re using a spare PC to host your Minecraft server, follow the instructions below to download and install the Java Runtime Environment (JRE) for your operating system.

  1. Go to the Microsoft OpenJDK Downloads page.
  2. Select the macOS installer for the latest LTS version of Java.
  3. Download and run the .pkg file.
  4. Follow the installation prompts to complete the setup.

  1. Go to the Microsoft OpenJDK Downloads page.
  2. Choose the Windows installer (.exe) for the latest LTS version of Java.
  3. Download and run the installer.
  4. Follow the on-screen instructions to finish the installation.

  1. Open a terminal and update your package list:

    Terminal window
    ...
    sudo apt update
    sudo apt upgrade -y
    ...
  2. Search for the appropriate JRE package:

    Terminal window
    ...
    sudo apt search "jre-headless"
    ...
  3. Pick the appropriate package from the search results. For example, to install OpenJDK 17 JRE headless, you would choose openjdk-17-jre-headless. This will depend on the version of Minecraft you plan to run.

    Terminal window
    ...
    Sorting... Done
    Full Text Search... Done
    default-jre-headless/stable,stable 2:1.11-72 amd64
    Standard Java or Java compatible Runtime (headless)
    openjdk-11-jre-headless/stable,stable-security,stable,stable-security 11.0.14+9-1~deb11u1 amd64
    OpenJDK Java runtime, using Hotspot JIT (headless)
    openjdk-17-jre-headless/stable,stable-security,stable,stable-security 17.0.2+8-1~deb11u1 amd64
    OpenJDK Java runtime, using Hotspot JIT (headless)
    ...
  4. Install the JRE package:

    Terminal window
    ...
    sudo apt install openjdk-17-jre-headless -y
    ...
  5. Verify the installation:

    Terminal window
    ...
    java -version
    ...