1

The full error is - 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

I first got it when trying to update old servers, this is from a fabric server and I get the same thing when running it on my own machine with no third party.

Java is fully updated

1
  • welcome to stackoverflow. before post a question, please try to check error message with a bit more care. they may sometimes seem cryptic but mostly contain just what you need. you need a newer java class file version of 61, which is java 17 that is released only few months ago. Commented Jan 1, 2022 at 4:54

2 Answers 2

2

You misunderstand the problem. It's not that the files are compiled by an older version of Java. It's that they're compiled by a newer version. You either need to update Java on the server, or downgrade Java on your own machine to match the server and then recompile everything.

3
  • and the latter is the best solution as Java16 is out of support, 17 is the current LTS.
    – jwenting
    Commented Dec 31, 2021 at 20:19
  • 1
    Downloading a newer Java SE Development Kit will resolve the problem. oracle.com/java/technologies/javase/…
    – Flea
    Commented Apr 3, 2022 at 23:04
  • @Flea is completely right. The error message is a little bit misleading. You do not have to downgrade anything on your system. What I want to highlight at this point is, that for Minecraft Server, it must be the development kit (JDK) it is not sufficient to only install the latest runtime environment (JRE).
    – NelDav
    Commented Nov 13, 2023 at 20:12
0

try downgrading your java on your machine, like if the server needed java 8 and you have java 16, then uninstall java 16 and install java 8. it worked for me.

1
  • 2
    actually it is the opposite. from the error, OP needs a newer java version. welcome to stackoverflow. try to read just a bit more slowly and make sure you understand the question. Commented Jan 1, 2022 at 4:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.