TheRemote/RaspberryPiMinecraft

Unsupported Java detected (61.0)

NotMick opened this issue · 4 comments

When I try to start a server on version 1.13 to 1.16.5 I get the following error during the setup:

...
Building the Minecraft server...
Downloading vanilla jar...
Patching vanilla jar...
Unsupported Java detected (61.0). Only up to Java 13 is supported.
Accepting the EULA...
...

...
Minecraft can automatically start at boot if you wish.
Start Minecraft server at startup automatically (y/n)?n
Your time zone is currently set to Europe/Berlin. Current system time: Mon 16 May 18:59:38 CEST 2022
You can adjust/remove the selected reboot time later by typing crontab -e
Automatically reboot Pi and update server at 4am daily (y/n)?n
Setting server file permissions...
tail: cannot open '' for reading: No such file or directory
Setup is complete. Starting Minecraft server...
There is no screen to be resumed matching minecraft.
There is no screen to be resumed matching minecraft.
...

This one is for version 1.14.4. The only difference between the versions is the Unsupported java error.

I'm using a Pi 4 8gb and Raspbian 64bit OS

Version 1.11.2, 1.12.2, 1.17 and 1.18 work

What the... thanks for reporting this! I'd imagine the problem is that Paper has checks for older JDKs in there. This one is using OpenJDK 17 at the moment.

Can you try the following commands:

cd ~/minecraft
rm -rf jre
curl -H "Accept-Encoding: identity" -H "Accept-Language: en" -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4.212 Safari/537.36" https://cdn.azul.com/zulu/bin/zulu13.48.19-ca-jdk13.0.11-linux_aarch64.tar.gz -o jre13.tar.gz -L
tar -xf jre13.tar.gz
rm -f jre13.tar.gz
mv jdk-* jre

Then try launching the server. It's silly that 1.11.2 and 1.12.2 work. That just shows that this restriction is absolute nonsense. It works fine if Paper would "let" it work! This will also break newer versions as then it will be too low but if you ever upgrade you can just delete the jre folder and run SetupMinecraft.sh again and it will take you to the latest.

I'm not sure what to do about this yet. Let's see if that gets it going for you first and I'll give some thought about how to address this in the script!

Actually I found a better solution to this. I went straight to the Paper Minecraft team (linked above) and they said they aren't going to fix it because they have "no interest in fixing older versions".

If that's where it ended I would have forked this and the containerized version off Paper completely, or at least I was seriously weighing it as there are a bunch of other forks out there now to choose from, dozens at least, including a truly multithreaded one I was wanting to check out. Paper is not as "special" as it used to be, nor is it a requirement to get good performance on devices like the Pi anymore.

I constantly get requests for Sponge as an example and some of the other ones that allow a lot more "mods" vs. plugins. It's probably time for me to package some of these server packages and hedge my bets a little bit. I'm a big fan of Aikar and he hasn't really been developing for Paper (or much of anything at the moment) on GitHub and I can kind of "feel" his absence.

It doesn't make a lot of sense to me that they would continue to serve these versions live on the servers if they are unwilling to support them but that is solely up to them. I could choose what I wanted to support too but I just support whatever people are trying to do with my projects generally speaking. At the very least I would no longer serve them live on my API if I pulled support. That is their right though, just like it's the end users / downstream developer's right to choose whether to continue to use their project.

Fortunately there is a solution. They told me about a flag that will disable this behavior (definitely good enough for my purposes): -DPaper.IgnoreJavaVersion=true

I've added this in. If you run SetupMinecraft.sh again it should pass this version check!

It works now! Thank you so much!

No problem at all, thanks for reporting and following up!