Java version problems

java.lang.IllegalArgumentException: Comparison method violates its general contract!

What it looks like in the log

java.lang.IllegalArgumentException: Comparison method violates its general contract!

How to fix it

  1. If Minecraft crashes when generating or loading a world on Java 7 or Java 8 (especially in Infdev, Alpha, Beta, or older modded versions), open your launcher's instance settings and add `-Djava.util.Arrays.useLegacyMergeSort=true` to the JVM Arguments.
  2. If you are running an early pre-release Minecraft version (like Infdev or Alpha) on Java 9 or newer, switch the instance's Java installation back to 64-bit Java 8 (combined with the `-Djava.util.Arrays.useLegacyMergeSort=true` argument) or Java 6.
  3. If the crash log comes from the launcher itself before the game even starts (for example, showing `org.jackhuang.hmcl` while loading versions), download the latest version of your launcher to get the fixed version-number sorter.
  4. If the crash occurs inside a modern modded Minecraft version, read down the stack trace past `java.util.TimSort` and `java.util.Arrays.sort` to find the first mod class listed, then update or remove that mod.
LoadersVanilla, Forge, Neoforge, Fabric, Quilt
SeverityStops the game
CategoryJava version problems

Check your own log

Related errors