Java version problems

The requested compatibility level JAVA_16 could not be set

What the log looks like

java\.lang\.IllegalArgumentException: The requested compatibility level JAVA_16 could not be set\. Level is not supported by the active JRE or ASM version

How to fix it

  1. Check which Minecraft version your profile is set to launch.
  2. If you are playing Minecraft 1.16.5 or older: open your 'mods' folder, find any mods or libraries (such as Fabric API or Sodium) that were accidentally downloaded for Minecraft 1.17/1.18+, and replace them with versions built specifically for 1.16.5.
  3. If you are playing Minecraft 1.17 or newer: open your launcher's installation or instance settings and check the 'Java Executable' option.
  4. Clear any custom Java 8 path so the official launcher uses its bundled Java runtime, or install Adoptium Temurin Java 17 (for MC 1.17–1.20.4) / Java 21 (for MC 1.20.5+) and point your third-party launcher to that executable.
  5. If this happens on a server, edit your start script (.bat or .sh) to call a Java 17+ binary directly instead of relying on a Java 8 system default.
LoadersFabric, Quilt, Forge, Neoforge, Server
SeverityStops the game
CategoryJava version problems

Check your own log

Related errors