Update: The MineOS Turnkey ISO ships with Java 16 as of June 28, 2021
Here are the steps I used to upgrade Java 8 to Java 16 on an installation of the official MineOS ISO. These steps are executed on the MineOS server as root. Ensure there are no running servers or java processes.
This ISO is distributed as Debian “Stretch”, which does not have access to the same repositories as Debian “[anything after Stretch]”. Ultimately, distros will grow older and not have access to new software by default.
Explanation of steps
apt remove java-common
– Remove the default java installation (8). This also removes the file used to launch java which is located at /usr/bin/java.
– Download a Java that is Debian binary-compatible
tar -xf openjdk-16.0.1_linux-x64_bin.tar.gz -C /opt/
– Extract the contents to some directory (in this case, /opt because is it a well-accepted location for Java)
ln -s /opt/jdk-16.0.1/bin/java /usr/bin/java
– Ensure java the binary can be found by root in the $PATH variable. By adding a symlink to /usr/bin which is always part of root's path, this should allow MineOS and users logged in as root (or otherwise) to access java simply.
Does this allow MineOS to run normally?
I have built a server at home for my kids and myself to play on.
There are currently 7 live worlds, ranging from Galacticraft 1.12.2 with Forge to Vanilla 1.16.4.
My kids are really excited about 1.17.x and as outlined on this forum, Java8 won’t cut it.
If I bring down any of the worlds my kids will surely kill me, they play on the servers daily.
If the answer is have a go and see I’m cool with that. I’ll spin up a VM and test each world, but if it should work okay, then I’d rather apply the fix directly to the main MineOS server.
I’m running MineOS on top of Ubuntu Server 20.04.
Just to share, been a long time user of mineos (since 1.7.10 days) and I can confirm since Mojang’s 21w19a snapshot release now requiring java 16 as JDK 15 has been superseded, hexparrot instructions work with no issues you just have to change the from 15 to 16 for source download, extracting & linking (see modifications below), I been running mineos on a dedicated dell r610 & vmware esxi host and the update works thanks to @hexparrot for keeping this project alive
Just make sure you shut down all minecraft instances and confirm no java service is running using ps command
EDIT: I managed to solve it by reinstalling MineOS Turnkey and before attempting the steps in this guide, I headed to /usr/bin and manually deleted the jar symlink (I believe it was).
If anyone else has the same problem, here is what I did:
Did a full reinstall of MineOS Turnkey from my USB stick
Using FileZilla, I connected to the MineOS computer from my personal computer as root and headed to /usr/bin and removed the jar symlink manually. (If I tried accessing /usr/bin/jar, an error message stating it doesn’t exist appears. I downloaded the file before deleting it to see that it actually was a file of something.)
In the terminal/console/whatever you call it I did the following (typing it in manually): apt remove java-common wget https://download.java.net/java/GA/jdk16.0.1/7147401fd7354114ac51ef3e1328291f/9/GPL/openjdk-16.0.1_linux-x64_bin.tar.gz tar -xf openjdk-16.0.1_linux-x64_bin.tar.gz -C /opt/ ln -s /opt/jdk-16.0.1/bin/java /usr/bin/java
I tried starting a fresh minecraft server with the Minecraft version 1.17-rc1 and it worked perfectly.
End of edit.
General information about my skill level and OS
First of all, I am a noob. I’m not that experienced with Linux. I understand it somewhat, but there’s only the console and I’m used to Windows. I would love to learn how Linux works, but now I’m in a rush for the 1.17 release.
I use the MineOS Turnkey (Downloaded the ISO with Rufus and use it as the only OS).
I can’t start any of the Minecraftversions 1.17-preX or 1.17-rc1. Only versions before 1.17 works. So I searched for a solution and found this article, but something’s not working for me.
I did these steps:
TrueNAS user here, as well.
If anyone else has TrueNAS/FreeNAS and can come up with a modified set of instructions, it would be greatly appreciated! Likewise, if I happen to find a modified set of instructions for TrueNAS/FreeNAS, I will be sure to post here.