Minecraft "Game crashed / exited with code 6": how to find the cause and fix it
Exit code 6 is not a documented Minecraft error. It only tells you the Java process running the game ended unsuccessfully, so the real cause is in the game log. The one fix confirmed in a user report was installing the Java version that matches the game and setting its path by hand in the launcher.
On this page
What it means
When a launcher says the game "exited with code 6", it is reporting that the Java process running Minecraft stopped abnormally and handed back the number 6. I could not find any definition of that number from Mojang or Microsoft, so it is not a documented error with one fixed meaning. Third-party guides say the same about codes like 1 and -1: the number only says "it did not finish cleanly".
So do not search for "what does 6 mean". Look at the logs instead, they say what actually went wrong.
Reports of this code come mostly from Java Edition with third-party launchers such as Prism Launcher and from modded installs (Forge 1.12.2, and 1.16.5 with mods like Embeddium or Oculus). The evidence is thin, so treat the Java mismatch below as the most likely cause, not a certain one.
Symptoms and causes
You are likely dealing with this problem if:
- The game window closes immediately or never opens, and the launcher shows "Game crashed" or "exited with code 6".
- The problem appears on an older or modded version while a newer version (for example 1.21.5) runs fine.
The usual causes, most common first:
- Wrong Java version, or a Java path the launcher does not recognise
- Each Minecraft version needs a specific Java: 1.16.5 and older use Java 8, 1.17 uses Java 16, 1.18 to 1.20.4 use Java 17, and 1.20.5 and newer (including 1.21.x) use Java 21. Forge 1.12.2 needs Java 8. This is the only cause with a confirmed fix in the sources I read: a Forge forum user on Linux fixed it by installing an Azul Zulu Java 8 build and setting the path manually.
- Something else that the log will show
- Because the code is generic, a specific mod, a missing file or another startup failure can produce it too. I found no verified source tying exit code 6 to a particular mod combination, driver or security program, so let the log decide.
How to fix it
Work through these in order. They start with the quickest, safest checks and move to deeper repairs; stop as soon as the problem is gone.
1.Read the log and crash report
The log names the real failure (wrong Java, a specific mod, a missing file). It is faster than guessing.
- Press WinR, paste the path below and press Enter to open the logs folder (Windows, default launcher).
%appdata%\.minecraft\logs - Open
latest.login Notepad and scroll to the end. Look for lines mentioning Java, a mod name, or "Exception". - Also open the newest file in the
crash-reportsfolder next tologs, if one exists. In a third-party launcher, use the instance's log view instead.
2.Install the Java version that matches your game version
A mismatch between game and Java is the best-supported cause of this code.
Before you start: The official Minecraft Launcher bundles its own Java runtime, so a separate install is usually only needed for third-party launchers and manually managed modded setups.
- Check your Minecraft version, then pick Java accordingly: Java 8 for 1.16.5 and older (and Forge 1.12.2), Java 16 for 1.17, Java 17 for 1.18 to 1.20.4, Java 21 for 1.20.5 and newer.
- Install a matching Java build from a reputable vendor (the Forge forum user used an Azul Zulu build of Java 8).
3.Set the Java path manually in the launcher
The launcher may be picking the wrong Java or not recognising the one it found.
- In your third-party launcher, open the instance settings and point the Java path to the Java you just installed. The exact menu names differ between launchers.
- In the official launcher, go to Installations, Edit your installation, open More options and set Java executable.
- Launch the game again and check whether the exit code or message changes.
4.Launch without mods, then add them back
If the log points at a mod, or you cannot tell, this separates the vanilla game from your mod set.
Before you start: Copy your mods folder somewhere else first so nothing is lost.
- Move all files out of the
modsfolder, or create a fresh instance with no mods. - Start the game. If it works, return the mods in small groups and launch after each group to find the one that breaks it.
- Make sure every mod matches both your Minecraft version and your loader (Forge or Fabric).
Check that it worked
- The game window opens and reaches the main menu.
- The launcher no longer shows "exited with code 6" and the log has no Java startup error.
If it still fails
- Copy the last lines of
latest.logand any crash report, and ask on the support channel of your launcher or mod loader, naming the Minecraft version, loader version and Java version. - Check Mojang's official help pages at help.minecraft.net for crash report guidance, especially if you use the official launcher.
- If the launcher itself will not start the game on Windows, see Minecraft Launcher error 0x803F8001.
Questions
Is exit code 6 specific to Java 8?
No. In the one thread with a confirmed fix, Java 8 was the right answer for that setup, but nothing shows the code itself points to Java 8.
Sources
- Game crashes on 1.12.2 with exit code 6 · Minecraft Forge Forums