Update Java (JDK) to Latest Version on Linux

1. Build MC server 1.18.1

As soon as Minecraft 1.18.1 was updated, I went to the official website to download the server side.
Download page:
https://www.minecraft.net/zh-hans/download/server
download link:
https://launcher.mojang.com/
When running, the panel reports an error:

The error indicates that the server JDK version is too low.

2. Install the latest version of JDK

Run the command:

Comment first then view it after your comment is approved. Join QQ Group to display all hidden texts.

You can install the latest version of JDK.

Remove legacy soft links:

Bash
1
rm - rf /usr/bin/java

New soft link:

Comment first then view it after your comment is approved. Join QQ Group to display all hidden texts.

Note: If Oracle releases a new version of Java, the path may change!

It is recommended to use:

Bash
1
ls /etc/alternatives/

Check the new version installation path.
Use the command:

Bash
1
java - version

You can see that the version becomes the latest version.

4. Start the Minecraft server

You can see in the panel that the startup is successful.

Update Java (JDK) to Latest Version on Linux

https://blog.tsinbei.com/en/archives/149/

Author
Hsukqi Lee
Posted on

2022-02-05

Edited on

2022-07-28

Licensed under

CC BY-NC-ND 4.0

Comments

Name
Mail
Site
None yet