Minecraft 1.18 + Java 1.17

Hello MineOS/Minecraft friends. I thought I would make this post to hopefully help out some folks that will be updating in the next few days. I run MineOS in a docker in unRAID. In order to get my servers running on the fancy new update, 1.18, I had to update the java version in my docker. This should work for stand alone Linux OS/VM/etc (not for windows). You might have to tweak some steps a little based on your setup.

From the CLI:
apt remove java-common
Go to JDK 17.0.1 GA Release and download the linux package. You can also use something like wget in the CLI. Transfer the downloaded file to your MineOS. In my case, I dropped it in /var/games/minecraft.
mv /var/games/minecraft/openjdk-17.0.1_linux-x64_bin.tar.gz /tmp/openjdk-17.0.1_linux-x64_bin.tar.gz
cd /tmp
tar -xf openjdk-17.0.1_linux-x64_bin.tar.gz -C /opt/
ln -s /opt/jdk-17.0.1/bin/java /usr/bin/java

Then I was able to start my Minecraft 1.18 worlds successfully. Hope this save some people time and pain.

Thanks!

3 Likes

After taking these steps I can no longer reach the Web UI.

Hello, I am trying to follow the steps, but when I get to the last one it gives me an error. It says “ln: failed to create symbolic link ‘/usr/bin/java’: Files exists”. To me, this sounds like there is already a java installed? When I run the line to remove the previous java it states that java-common is not installed, so not removed. Do you have any idea why this would do this? I’m very new to Linux, so I don’t exactly know what most of this means. I’ve been trying to solve this for hours now with no luck.

In the last command do “ln -sf” instead of “ln -s” to force the symbolic link to be overwritten.

1 Like

Thank you so much! This worked great!

This worked! Thank you!!!

Thank you so much for this information. I am completely linux illiterate but was able to use your post and another about upgrading to JDK 16 to do this from the command line using wget (first time ever) for those in a similar situation, here is how to do it from the CLI:

apt remove java-common
wget https://download.java.net/java/GA/jdk17.0.1/2a2082e5a09d4267845be086888add4f/12/GPL/openjdk-17.0.1_linux-x64_bin.tar.gz
tar -xf openjdk-17.0.1_linux-x64_bin.tar.gz -C /opt/
ln -sf /opt/jdk-17.0.1/bin/java /usr/bin/java

Thanks so much everyone, especially @NukesDidAnime @sneezing-undertone-d and @hexparrot

My kiddo will be happy that his dad figured out how to get our server back up and running

4 Likes

Capture d’écran 2021-12-05 165021
Hello, the first step tells me that the command (apt remove java-common) does not work. Then the second step seems to go perfectly. But the last two steps don’t work either. I am a beginner, can you help me please?
thanks in advance

1 Like

Thank you so much! Worked like a charm!

I got an error for the first command as well; perhaps someone more experienced can provide input - I’m inexperienced as well. It might be helpful to post any response you get when trying to install the new version.

It looks like, for some reason the command can’t get to /opt/. Maybe your install is in a different directory


What Linux are you using?

Yeah thank you. 1.17.1 silently asked for a java update too
 thanks for the procedure refresher. BTW if you are using docker you may want to commit the change to your image too.
docker commit your_container_name.

Worked perfectly, I love you so much.

This works as a one time thing, whenver the server restarts i need to re do these steps.

I am a noob to this, I have updated Java using the method above, updated node.js and npm but the webui is not working at all. I can ping the server, I can also putty into the server, but I am lost


I did figure it out, I re-ran the last command and it seemed to work.

Hi!
Using Turnkey trying to install Java 17 from command line logged in as mc
When I run the tar step I get:
tar: You may not specify more than one ‘-Acdtrux’, ‘–delete’ or ‘–test-label’ option


Any suggestions?
Thank you

Or i get opt: cannot mkdir: permission denied

Did you us su or sudo? as it may need root to run.