Перейти к содержимому

The file was built for a different Java runtime

A class requires a newer Java release than the started process understands. The server's runtime is what matters. Changing Java on your own computer does not resolve this server-side conflict.

An example of this log message

java.lang.UnsupportedClassVersionError: com/example/Plugin has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0

Which file requires the newer version?

Read the class name in the error block and check whether it belongs to the server or a plugin. Compare that exact release's requirements with the runtime in use. A single updated plugin may require more than the rest of the server.

Select versions together

Back up configuration and game state. Use either a supported Java runtime or an edition of the affected extension compatible with the current environment. On restart, check the Java version actually reported and then the JAR's loading message.

Questions about this error

Should I always choose the latest Java?

The server software and your extensions must support that runtime. The highest available version number is not a sufficient selection rule.

Does renaming the JAR help?

Its file name does not change the compiled content. The requirement stays the same.

Check a connected log excerpt