I have a Minecraft Java Edition server and up until version 1.17 the process of updating the server to the latest version was a simple matter of downloading the server.jar file here and replacing the existing file with it.
Usually you just run it with the below command in the terminal and you’re good to go. In my case I just created a batch file to avoid having to type the below every time I want to start the server.
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
Any who, this time around I got the below error despite the fact that my Java version was fully updated (Java 8 Update 291).
But here’s where the problem comes in, as it states above the latest server.jar file was compiled using a more recent version of the Java Runtime – version 60, and Java 8 only supports up to version 52.
So all you need to do to fix this is download and install Java SE Development Kit 16 (17 at the time of publishing this), and it will install right alongside your older version without the need of uninstalling or overwriting it. Once that’s been done, you will be able to run the server.jar command as you did before.