Error with .jar file

Hi all.

I’m following the minecraft server guide and have has some errors but have reached a point where I haven’t found any more threads. I’ve gotten to this thread, I’ve deleted the native .jar file and replaced it with the one from the official Minecraft website here. I’m now getting this error:

My (quite limited) understanding of this is that I need to update java on my Pi, but I’m not sure how to do that.
TYIA and any help is appreciated.

Hi @axlotl1,
Some questions that’ll help us better understand what might be happening: Did you see an error similar to Error: Invalid or corrupt jarfile paper.jar which prompted you to replace the native .jar file with the official Minecraft .jar? Which device are you attempting to run an MC server on, and which Minecraft version? I see in this GitHub issue thread (Error: Invalid or corrupt jarfile paper.jar · Issue #99 · AlexProgrammerDE/balena-minecraft-server · GitHub) that it was suggested to add an environment variable ENABLE_UPDATES and set it to true. Has that been done on your balenaCloud dashboard?


Yes I was getting the “Error: Unable to access jar file paper.jar” which I’m now getting again. I thought I had set ENABLE_UPDATES to true but I will do it through the dashboard to see if it fixes it.

I’ve got a raspberry pi 4B and the jar file I used is 1.17 version.

I’ve added the environment variable but I’m still getting the same error unfortunately

Hi Greg, I have two quick thoughts on this issue.

First, while I can definitely understand the desire to build the project yourself and all the learning that goes along with it, I am wondering what happens if you try to deploy one of the ready-made builds by simply clicking the blue “Get Started” button here: balenaHub: an easier way to find and publish apps and projects for edge devices

Second, even doing a full build of your own should have worked, and there should not have been a need to swap out any .jar files. Are you able to try building from scratch, and let us know what the error you receive is? I suspect @AlexProgrammerDE will want to know what went wrong on the build. Thanks!


I had no idea that fleets were ready-made, I’m glad you’ve shown me them as it will make my life easier. All I have to do is flash it to the microSD I’m using and it’ll work? Will it show up on my dashboard or is it a standalone piece?

When you say building from scratch, do you mean following the guide from beginning to end? I can retry the whole process if needed.


Yes, that is correct, simply flash it and the project will build and deploy to the device. It will take about an hour probably start to finish, from containers building, to device downloading them and running. You do lose the visibility of the dashboard in this scenario, however, and it’s just a standalone device. In fact, you’ll have to check your network for the IP address that gets assigned to the Pi. That IP address is what you would then use as the MC Server IP to connect to.

Or, alternatively like you mentioned, you can rebuild the project from scratch and we can try to troubleshoot what went wrong.

I’m guessing connecting the server worldwide is the same process as building the project, so I’ll use the fleet for now and worst case scenario I’ll rebuild from scratch and troubleshoot with you kind folks!

Thanks for your help!

Happy to help, let us know if you have troubles with the paths that David recommended. Especially with your device joining the fleet on Hub, we are looking forward to feedback on that. Any logs or errors that you see would be most helpful in debugging if you end up trying to rebuild the project from scratch.

Hi folks!

I’ve flashed the fleet on a microSD, put it in my Pi and plugged it into power and ethernet, and left if for a few hours. I’m not getting this error from Minecraft when trying to connect. Did I pull the wrong IP?

Well, that is possible. There are a few options:

  • What does that button do, that says “Back to Server List”? Does it happen to show any other local servers? :slight_smile:
  • Second, if you login to your router, can you check for any / all devices and their IP addresses that are on your network? A balena device will probably show up by name as a random string of letters/numbers, so that might help narrow down which one it is. The in Minecraft, try connecting to that IP address.
  • Finally, @AlexProgrammerDE (who manages the fleet) might be able to double check the device to find its local IP, and ensure it is online / healthy.

Back to server list shows me a list of global servers I have saved, and the searching for local sever message but it hasn’t found one. I’ve tried all IPs that fit the random string of numbers/letters name and none of them worked, although one gave me a timeout instead of connection refused.

@AlexProgrammerDE Whenever you’ve got a moment could you check for my device?

I tried a few different things today;

  1. First, I made sure I knew the IP of my Pi, its now showing up on my router like this:
  2. Next, I reinstalled java on my PC that I was using to connect to the server, same error.
  3. I also turned off my firewall to see if that was the issue and got the same error.

I think I’ll attempt a fresh build and see how it goes, as that seems to be the best way to see what’s going on on the Pi.

Hi @axlotl1, checking in to see if a fresh build worked for you. I deployed a balena Minecraft server to test the steps and see if I could replicate, and was able to connect without issues. Here are the steps I took:

With a fresh build and following these steps, does Minecraft start up fine for you?


@axlotl1 Hi! Sorry for the extremely late response, but I wanted to let you know this issue has been resolved. If you use the open fleet then your device should have automatically been updated. If not then you need to redeploy the recent balena minecraft server repository to the raspberry pi as @cywang117 explained in the post above. The issue was that minecraft now requires java 16 to run properly and the older balena minecraft server versions only had Java 11, which made them not compatible. Hope it helps. Cheers!

Hi @cywang117, I just followed your steps as outlined. When I try to join server I get a connection refused error. In my dashboard logs I am getting the following:
Starting balenaMinecraftServer…
mc-server Forcing server update
mc-server Downloading 1.17.1 build 209…
mc-server Starting JAR file with: 2G of RAM
mc-server Error: Unable to access jarfile paper.jar

I don’t know where to go from here…
I have an RPi 4 w/ 4g ram
Everything was working( my son and I playing MC together) until about a week ago when it stopped…don’t know why…have tested the board with a RPi OS to verify the board is working, it is…
TIA for your help

For this error, it was resolved by deleting the jar file and rebooting. upon reconnecting java was updated to 16 and all is well.