Forums Archived

This forum has been archived. No new posts can be made and no new users can sign up. It remains here for reference only.

Find the new forums here

Minecraft new release 1.18 needs Java JDK 17

  • 1.8K Views
  • Last Post 02 December 2021
Srki posted this 02 December 2021

I can't run 1.18 Minecraft server because there is no JDK 17 to choose. I have JDK 16 as system default. Is there a way to update it, because I need JDK 17 for Minecraft 1.18.

I am running AMP Release "Triton" on Ubuntu 20.04.3 LTS. I updated to version v2.3.0.4.

Order By: Standard | Newest | Votes
webcraft posted this 02 December 2021

Are you running it within a container? If so, switch to night/alpha builds of amp, restart ampinstmgr and recreate the container by applying the new image. It should pull the new image automatically which contains jre17.
If you're running it right on the machine, add the latest jre17 release through your packet manager:
apt-get install -y openjdk-17-jre-headless (Debian/Ubuntu) or
dnf install -y java-17-openjdk-headless (CentOS).

Mike posted this 02 December 2021

You can run bash

<(wget -qO- getamp.sh) installJava

To install the appropriate versions automatically for your distro and version.

Srki posted this 02 December 2021

Yes, I am running it within a container. However, I'm a bit stuck on how to do all this.

I run (apt-get install -y openjdk-17-jre-headless) and it did install latest jre 17.

Then I logged in as AMP user with this command (sudo su -l amp)

To change to nightly I run (ampinstmgr switch Minecraft Nightly) and to restart I run (ampinstmgr restart)

I'm not sure how to recreate the container by applying the new image. I run (docker pull nginx:latest) and then run a command to delete the old container (docker rm Minecraft-nginx) and it says no such container, after that I was going to make a new container by running this (docker run -d -p 80:80 --Minecraft-nginx nginx:latest) but I didn't type this in yet since I'm stuck

Thank you for taking your time to help me out. I would appreciate it if you could guide me step by step since I'm not good at this.

Mike posted this 02 December 2021

If you're using a 3rd party docker image you need to talk to whoever maintains it.

Close