Join our Discord and be part of our community!
Which Java version do I use for my Minecraft server?
When installing or upgrading a Minecraft server, one of the parameters that needs to be properly configured is the “Java version” that corresponds with the server version, otherwise the server simply won’t boot.
Minecraft Version to Java Table
Server Version | Java Version |
1.16.5 & older | Java 8 |
1.17 - 1.17.1 | Java 16 |
1.18 - 1.20.4 | Java 17 |
1.20.5 + | Java 21 |
26.1 | Java 25 |
The above table shows java version each Minecraft version should generically use but sometimes a server software/plugin may be compiled with a different java version which makes it different. Read ahead
My server won’t boot it’s giving me UnsupportedClassVersionError errors
Your server may be giving you an error similar to below:
Caused by: java.lang.UnsupportedClassVersionError: net/minecraft/bundler/Main has been compiled by a more recent version of the Java Runtime (class file version 69.0), this version of the Java Runtime only recognizes class file versions up to 65.0Exception in thread "ServerMain" java.lang.UnsupportedClassVersionError: org/bukkit/craftbukkit/Main 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
The reason why is because you’re likely using the wrong java version. These two errors are when you try to boot a server with the wrong java version (docker image) and the server wont boot till you use the right one.
Why does my plugin fail to load?
[02:39:05 ERROR]: Fatal error trying to convert WorldEdit v7.3.1+6763-2e55f4f:com/sk89q/worldedit/bukkit/WorldEditPlugin.classjava.lang.IllegalArgumentException: Unsupported class file major version 65
The above error is different, its from a plugin. Your server may boot but a plugin might be incompatible and shuts itself down or the server crashes. You’ll always see a similar error when this happens.
How do I identify which version to use?
Now you may be asking how do i know what version I need to use? Well the error message contains hints such as “class file version X” or “Unsupported class file major version X” which tells you which Java version you need. We recommend visiting this site to see a list of Java class file version and identify which java version you need However we do have a tool below which can also help.
Related Documentation
Change the Minecraft Server TypeInstall Custom Server Software
If you require further assistance, you can open a support ticket here.
Feedback and suggestions can be submitted here or further discussed on our Discord server.