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.
Downloading OpenJDK for Mac
Section titled “Downloading OpenJDK for Mac”- Go to the Microsoft OpenJDK Downloads page.
- Select the macOS installer for the latest LTS version of Java.
- Download and run the
.pkgfile. - Follow the installation prompts to complete the setup.
Downloading OpenJDK for Windows
Section titled “Downloading OpenJDK for Windows”- Go to the Microsoft OpenJDK Downloads page.
- Choose the Windows installer (
.exe) for the latest LTS version of Java. - Download and run the installer.
- Follow the on-screen instructions to finish the installation.
Downloading JRE for Ubuntu (Debian)
Section titled “Downloading JRE for Ubuntu (Debian)”-
Open a terminal and update your package list:
Terminal window ...sudo apt updatesudo apt upgrade -y... -
Search for the appropriate JRE package:
Terminal window ...sudo apt search "jre-headless"... -
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... DoneFull Text Search... Donedefault-jre-headless/stable,stable 2:1.11-72 amd64Standard Java or Java compatible Runtime (headless)openjdk-11-jre-headless/stable,stable-security,stable,stable-security 11.0.14+9-1~deb11u1 amd64OpenJDK Java runtime, using Hotspot JIT (headless)openjdk-17-jre-headless/stable,stable-security,stable,stable-security 17.0.2+8-1~deb11u1 amd64OpenJDK Java runtime, using Hotspot JIT (headless)... -
Install the JRE package:
Terminal window ...sudo apt install openjdk-17-jre-headless -y... -
Verify the installation:
Terminal window ...java -version...