Fix UnsupportedClassVersionError: Java Versions for Minecraft
Learn why Minecraft fails with UnsupportedClassVersionError, how class file versions map to Java versions, and how to fix mod version mismatches fast.
java.lang.UnsupportedClassVersionError means Minecraft tried to load a code file compiled for a newer version of Java than the profile is currently running. It looks intimidating in your crash log, but the message names the exact file and the two versions involved, so the fix is usually one mod swap.
Understanding UnsupportedClassVersionError in Minecraft
When Minecraft fails to start and reports an UnsupportedClassVersionError, the Java Virtual Machine (JVM) has encountered a .class file built for a higher Java release than the active runtime supports.
A typical crash log line looks like this:
java.lang.UnsupportedClassVersionError: com/example/mod/ExampleMod 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
This error message provides three critical pieces of information:
- The class file name or mod package path (such as
com/example/mod/ExampleMod). - The class file version of the compiled file (such as
65.0). - The maximum class file version supported by your current Java runtime (such as
61.0).
Java compilers stamp every class file with a major version number corresponding to the JDK used during compilation. If the running Java Virtual Machine encounters a class file version higher than its own supported maximum, it halts execution immediately.
Class File Major Versions to Java Versions Mapping
To resolve this error, you need to map the internal class file major version numbers back to standard Java version releases.
As a rule of thumb for Java 8 and newer, you can determine the class file major version number by adding 44 to the Java release version number. For instance, Java 17 plus 44 equals class file major version 61.
Here is the standard mapping between class file major versions and Java releases:
- Class file version 52.0 maps to Java 8.
- Class file version 60.0 maps to Java 16.
- Class file version 61.0 maps to Java 17.
- Class file version 65.0 maps to Java 21.
- Class file version 69.0 maps to Java 25.
When your log states that the runtime only recognizes class file versions up to 61.0, your profile is running Java 17. If the log states that a mod requires class file version 65.0, that mod was built specifically for Java 21.
Minecraft Version Requirements by Java Version
Mojang updates the baseline Java version required to run Minecraft across major game updates. Knowing which Java version corresponds to each Minecraft release helps pinpoint version mismatches:
- Minecraft 1.16.5 and older releases require Java 8 (class file version 52.0).
- Minecraft 1.17 and 1.17.1 require Java 16 (class file version 60.0).
- Minecraft 1.18 through Minecraft 1.20.4 require Java 17 (class file version 61.0).
- Minecraft 1.20.5 through 1.21.x require Java 21 (class file version 65.0).
- The new 26.x versions require Java 25 (class file version 69.0).
If you run Minecraft 1.20.1, the game engine uses Java 17. If you attempt to load a mod created for Minecraft 1.20.5 or 1.21, that mod expects Java 21. Because Java 17 cannot read Java 21 class files, the game crashes with UnsupportedClassVersionError.
Why UnsupportedClassVersionError Happens in SuperLauncher
SuperLauncher handles Java installations automatically. Depending on the Minecraft version selected for your profile, SuperLauncher downloads and runs Java 8, 17, 21, or 25 without requiring manual configuration.
SuperLauncher intentionally omits custom Java path selectors and custom JVM argument controls. This design prevents environment corruption and eliminates broken Java path errors.
Because SuperLauncher provisions the correct Java runtime automatically for every game profile, UnsupportedClassVersionError in SuperLauncher does not mean your Java installation is corrupt or missing. Instead, it indicates a mod or mod dependency mismatch inside your profile. A mod file located in your mods folder was compiled for a newer Java runtime than the game version of that profile supports.
If your game fails to launch before reaching the main class due to memory or launch flag issues, see our guide to 'Could not create the Java Virtual Machine' errors. For general exit codes and unhandled launch crashes, see our guide to exit code 1.
Common Causes and Fixes Ranked by Frequency
The likeliest causes of UnsupportedClassVersionError are ranked below from most common to rarest, along with step-by-step solutions for each case.
1. Installing a Mod Built for a Newer Minecraft Version
The most common cause is downloading a mod compiled for a newer Minecraft release and placing it into an older game profile. For example, downloading a 1.20.6 or 1.21 build of a popular mod and placing it inside a 1.20.1 profile will trigger this crash because 1.20.1 runs on Java 17 while 1.20.6+ requires Java 21.
I would check the launcher log first to identify which file is causing the clash.
- Locate the red notice displayed by SuperLauncher when launch fails.
- Open the launcher log file located at
%APPDATA%\SuperLauncher\logs\superlauncher.logor check.minecraft\logs\latest.log. Note that SuperLauncher overwritessuperlauncher.logevery time you launch, so make a copy of the file before launching again. - Search the log for
UnsupportedClassVersionErrorand locate the class path listed directly after the error name. - Click the Open version folder button inside SuperLauncher to open
%APPDATA%\.minecraft\versions\<profile name>. - Open the
modsfolder located at%APPDATA%\.minecraft\versions\<profile name>\mods. - Remove the incompatible mod
.jarfile, or replace it with the build compiled specifically for your profile Minecraft version.
How to confirm it worked: Launch your profile in SuperLauncher. Open %APPDATA%\.minecraft\logs\latest.log and verify that Minecraft loads to the main menu without throwing an UnsupportedClassVersionError.
2. Mod Dependency or Library Requiring a Higher Java Runtime
Some mods target an older Minecraft release but bundle an external Java library compiled on a newer JDK. Alternatively, a mod author may update a shared library dependency to require Java 21 while the main mod still advertises compatibility with Minecraft 1.20.1.
- Open
.minecraft\logs\latest.logor a crash report in.minecraft\crash-reports\. - Identify the package path named in the exception line.
- Search your mod list for the library or utility mod associated with that package name.
- Check the dependency list for that mod on Modrinth or CurseForge to verify its required Java runtime.
- Replace the library
.jarin%APPDATA%\.minecraft\versions\<profile name>\modswith a release compatible with your profile Java version.
How to confirm it worked: Start the game profile and monitor .minecraft\logs\latest.log. The game should load past the early mod initialization phase without crashing.
3. Manually Updating Individual Mods Inside a Modpack
When playing a pre-built modpack, manually updating individual mods can break the pack Java baseline. If a mod author releases a new build targeting Java 21 for Minecraft 1.20.5, installing that file into a 1.20.1 modpack profile running Java 17 causes an immediate version clash.
- Open
%APPDATA%\.minecraft\versions\<profile name>\mods. - Sort the folder contents by modification date to find recently added or updated
.jarfiles. - Remove the updated
.jarfile and restore the original mod file version provided by the modpack author. - If you must use the updated mod, create a new profile in SuperLauncher using the newer Minecraft version that supports Java 21.
How to confirm it worked: Launch the profile from SuperLauncher and ensure %APPDATA%\SuperLauncher\logs\superlauncher.log finishes startup without class loading exceptions.
4. Outdated Mod Loader or Coremod Bytecode Mismatch
The rarest cause involves outdated mod loader builds or coremods that inject bytecode during early launch. If a coremod targets Java 21 class structures on a Java 17 profile, class loading fails during early initialization.
- Open SuperLauncher and select your game profile.
- Check the mod loader selection (Fabric, Forge, NeoForge, or Quilt) and update it to the latest release available for your game version.
- Launch the profile again so SuperLauncher writes a fresh
superlauncher.log. - Relaunch the profile so SuperLauncher can fetch updated loader binaries.
How to confirm it worked: Review %APPDATA%\SuperLauncher\logs\superlauncher.log after launch to verify the mod loader initializes cleanly without class version warnings.
What Does Not Help
When troubleshooting UnsupportedClassVersionError in SuperLauncher, several common advice threads found online will not resolve the problem:
- Searching SuperLauncher settings for a custom Java executable path. SuperLauncher manages Java runtimes automatically per Minecraft version. The launcher interface intentionally excludes custom Java path options, so looking for a path setting is a dead end.
- Manually installing new Java or JDK packages on Windows. Installing Java 21 or Java 25 from an external website onto your Windows system does not change the Java version used by SuperLauncher. SuperLauncher uses isolated Java runtimes stored in its own application directories.
- Adding custom JVM arguments to bypass version checks. Java bytecode version checking is enforced directly by the Java Virtual Machine specification. SuperLauncher does not allow editing JVM flags, and no JVM argument can force a Java 17 runtime to execute Java 21 bytecode.
- Deleting your entire
.minecraftfolder or deleting saved worlds. This error is caused strictly by compiled Java class version mismatches in mod files. Wiping your world saves or deleting your entire game directory will lose personal data without fixing the mod version issue.