[BUG] 1.18 needs Java 17
1.18 pre-2 update changed the required version to run the game. It now requires Java 17 instead of Java 16.
This is the error on the dashboard: mc-server Checking server JAR... Found a valid server file. It's called: paper.jar. Use ENABLE_UPDATE to update. mc-server Starting JAR file with: 3G of RAM mc-server Error: LinkageError occurred while loading main class net.minecraft.bundler.Main mc-server java.lang.UnsupportedClassVersionError: net/minecraft/bundler/Main has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 60.0

Do I need to update it manually or should I just wait?
how to do this manually ? i tried use 'FROM openjdk:17-jdk-buster', but dont work @MiniGPT
how to do this manually ? i tried use 'FROM openjdk:17-jdk-buster', but dont work @MiniGPT
Balena probably didn't release java 17, but I think that fabric 1.18 is using java 16 , maybe try using that version
how to do this manually ? i tried use 'FROM openjdk:17-jdk-buster', but dont work @MiniGPT
Balena probably didn't release java 17, but I think that fabric 1.18 is using java 16 , maybe try using that version
I fixed the problem by doing a workaround to install jdk 17 with the mc-server script, works, but it's not ideal
how to do this manually ? i tried use 'FROM openjdk:17-jdk-buster', but dont work @MiniGPT
Balena probably didn't release java 17, but I think that fabric 1.18 is using java 16 , maybe try using that version
I fixed the problem by doing a workaround to install jdk 17 with the mc-server script, works, but it's not ideal
How did you do that? I'd like to try as well.
how to do this manually ? i tried use 'FROM openjdk:17-jdk-buster', but dont work @MiniGPT
Balena probably didn't release java 17, but I think that fabric 1.18 is using java 16 , maybe try using that version
I fixed the problem by doing a workaround to install jdk 17 with the mc-server script, works, but it's not ideal
How did you do that? I'd like to try as well. put code below before java commands in mc-server/start.sh, works, but it's not ideal
curl -s "https://get.sdkman.io" | bash && source "$HOME/.sdkman/bin/sdkman-init.sh" && sdk install java 17.0.1-oracle
how to do this manually ? i tried use 'FROM openjdk:17-jdk-buster', but dont work @MiniGPT
Balena probably didn't release java 17, but I think that fabric 1.18 is using java 16 , maybe try using that version
I fixed the problem by doing a workaround to install jdk 17 with the mc-server script, works, but it's not ideal
How did you do that? I'd like to try as well. put code below before java commands in mc-server/start.sh, works, but it's not ideal
curl -s "https://get.sdkman.io" | bash && source "$HOME/.sdkman/bin/sdkman-init.sh" && sdk install java 17.0.1-oracle
I tried running that command and got this error, any idea whats wrong?

how to do this manually ? i tried use 'FROM openjdk:17-jdk-buster', but dont work @MiniGPT
Balena probably didn't release java 17, but I think that fabric 1.18 is using java 16 , maybe try using that version
I fixed the problem by doing a workaround to install jdk 17 with the mc-server script, works, but it's not ideal
How did you do that? I'd like to try as well. put code below before java commands in mc-server/start.sh, works, but it's not ideal
curl -s "https://get.sdkman.io" | bash && source "$HOME/.sdkman/bin/sdkman-init.sh" && sdk install java 17.0.1-oracle
I tried running that command and got this error, any idea whats wrong?
sorry, i forgot mention that need install the zip package put code bellow in mc-server/Dockerfile.template RUN install_packages wget jq zip
Every time my machine restarts, it re-installs mc-server which over writes all changes to Dockerfile.template and start.sh. Any idea how I can disable this behavior?
Where do I find mc-server? via WinSCP I get only these directorys

The actual serverfiles are located at /usr/src/serverfiles
mc-server, as referenced above, is the root directory you are looking at in that screenshot.
so in root should lay a Dockerfile.template ? I don't have one. Or should I just create it?
in usr/src is no serverfiles

how to do this manually ? i tried use 'FROM openjdk:17-jdk-buster', but dont work @MiniGPT
Balena probably didn't release java 17, but I think that fabric 1.18 is using java 16 , maybe try using that version
I fixed the problem by doing a workaround to install jdk 17 with the mc-server script, works, but it's not ideal
How did you do that? I'd like to try as well. put code below before java commands in mc-server/start.sh, works, but it's not ideal
curl -s "https://get.sdkman.io" | bash && source "$HOME/.sdkman/bin/sdkman-init.sh" && sdk install java 17.0.1-oracle
I tried running that command and got this error, any idea whats wrong?
sorry, i forgot mention that need install the zip package put code bellow in mc-server/Dockerfile.template RUN install_packages wget jq zip
Every time the service is restarted, it reverts back to java 16 and no longer has zip or sdk installed. How can we make these changes persist through the service restart?
you need deploy with theses changes from source
you need deploy with theses changes from source
Are you referring to creating a new release in the source code and pushing it from the balena-cli? Or is there something else you mean by source?
you need deploy with theses changes from source
Are you referring to creating a new release in the source code and pushing it from the balena-cli? Or is there something else you mean by source?
"creating a new release in the source code and pushing it from the balena-cli"
After all, how can I install java17?
After all, how can I install java17?
This is how I did it: Open mc-server from the balena dashboard terminal and enter these commands* one by one:
wget https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.1%2B12/OpenJDK17U-jdk_x64_linux_hotspot_17.0.1_12.tar.gz
tar xzf OpenJDK17U-jdk_x64_linux_hotspot_17.0.1_12.tar.gz
rm -rf /usr/local/openjdk-16
cp ./jdk-17.0.1+12 /usr/local/openjdk-16
wget https://papermc.io/api/v2/projects/paper/versions/1.18/builds/25/downloads/paper-1.18-25.jar
rm /usr/src/serverfiles/paper.jar
rm /usr/src/serverfiles/papersha256.txt
cp ./paper-1.18-25.jar /usr/src/serverfiles/paper.jar
echo '90606f2be5d5306a85febe016a84be6f081f544ff2085292fba9ec83b9cf31f4 paper.jar' > /usr/src/serverfiles/papersha256.txt
*This is what those commands do: 1) download java 17 from adoptium.net's github. 2) unpack downloaded tar.gz. 3) remove java 16. 4) move java 17 into the place that 16 was (the reason it is moved as "java 16" is because the start.sh file is looking for a directory named "openjdk-16"). 5) download most recent (as of 12/3/2021) paper.jar from papermc.io. 6) delete mc-server's paper.jar. 7) delete mc-server's sha256 file. 8) move downloaded paper.jar into place. 9) create new sha256 file for downloaded paper.jar.
Finally you must stop, then restart the mc-server service. Don't reboot, or this process will have to be repeated.
After all, how can I install java17?
This is how I did it: Open mc-server from the balena dashboard terminal and enter these commands* one by one:
wget https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.1%2B12/OpenJDK17U-jdk_x64_linux_hotspot_17.0.1_12.tar.gz tar xzf OpenJDK17U-jdk_x64_linux_hotspot_17.0.1_12.tar.gz rm -rf /usr/local/openjdk-16 cp ./jdk-17.0.1+12 /usr/local/openjdk-16 wget https://papermc.io/api/v2/projects/paper/versions/1.18/builds/25/downloads/paper-1.18-25.jar rm /usr/src/serverfiles/paper.jar rm /usr/src/serverfiles/papersha256.txt cp ./paper-1.18-25.jar /usr/src/serverfiles/paper.jar echo '90606f2be5d5306a85febe016a84be6f081f544ff2085292fba9ec83b9cf31f4 paper.jar' > /usr/src/serverfiles/papersha256.txt*This is what those commands do: 1) download java 17 from adoptium.net's github. 2) unpack downloaded tar.gz. 3) remove java 16. 4) move java 17 into the place that 16 was (the reason it is moved as "java 16" is because the start.sh file is looking for a directory named "openjdk-16"). 5) download most recent (as of 12/3/2021) paper.jar from papermc.io. 6) delete mc-server's paper.jar. 7) delete mc-server's sha256 file. 8) move downloaded paper.jar into place. 9) create new sha256 file for downloaded paper.jar.
Finally you must stop, then restart the mc-server service. Don't reboot, or this process will have to be repeated.
It tells me is is a read only file system when i try to wget.
The host OS is read-only. You have to use the mc-server

java 17 is still not installed.
In my environment, openjdk-16 not exist and "java --version" command is not available. But, balena console said "System Info: Java 16 (OpenJDK 64-Bit Server VM 16.0.1+9-24) Host: Linux 5.10.78-v8 (aarch64)"