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

Cracked Gamer
  • 21
  • 1
  • 1
  • 2
  • 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. – Yılmaz Durmaz Jan 01 '22 at 04:54

2 Answers2

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.

  • and the latter is the best solution as Java16 is out of support, 17 is the current LTS. – jwenting Dec 31 '21 at 20:19
  • Downloading a newer Java SE Development Kit will resolve the problem. https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html?msclkid=66e5556cb3a111ecb57a6c21e35a5a9a – Flea Apr 03 '22 at 23:04
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
    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. – Yılmaz Durmaz Jan 01 '22 at 04:43