How to Fix Minecraft ‘Exit Code: 1’ (Java Edition Crash)

Quick Fix

Reinstall Java first — this fixes it for most players.

  1. Open Settings > Apps > Installed apps (or Add or Remove Programs), find Java, and uninstall it.
  2. Download and install the latest Java version from the official Java website.
  3. Restart your PC, then relaunch Minecraft.

If you use mods, also try disabling them all and launching vanilla first — a single bad or outdated mod is the other top cause of this crash.

Step-by-Step Guide

What this error means

'Exit Code 1' (sometimes shown as 'Game ended with bad state: Exit Code 1') is a generic crash signal from the Minecraft launcher — Exit Code 1 in Minecraft is a generic error code that tells you the game crashed unexpectedly. It does not point to one specific cause on its own. Common culprits include bad or incompatible mods, an outdated or corrupted Java installation, graphics driver issues, corrupted game files, or special characters in your Windows username that mess with the Minecraft Launcher path. Because the code itself is vague, the fastest way to narrow it down is to check your crash logs, then work through the fixes below in order.

Fix 1: Check the crash log for the real cause

  1. Open the log folder. Press Win + R, type %appdata%, hit Enter, then open the .minecraft folder followed by the logs folder.
  2. Open the latest log file. Navigate to the .minecraft folder, open the Logs folder, open the latest.txt file, and check the logs for a problem with any mod.
  3. Search for keywords. Search for lines mentioning ERROR or Exception — this can point you directly to the faulty mod or config.

Fix 2: Reinstall Java

  1. Uninstall the current Java version. Open Start, type Add or Remove Programs, find Java, and uninstall it.
  2. Install a fresh copy. Download the latest Java 17 from the official Java site.
  3. Restart your computer before relaunching Minecraft, since this reset resolves the issue for a large share of players.
  4. Alternative — fix the Java path instead of reinstalling. In the Minecraft Launcher, go to Installations, click the three-dot menu on your profile, choose Edit, enable the Java executable toggle, and point it to a valid java.exe (not javaw.exe) file, then Save.

Fix 3: Disable or remove mods

  1. Back up your mods folder first. Press Win + R, type %appdata%\.minecraft, and open the mods folder.
  2. Remove mods one at a time (or all at once) and relaunch vanilla Minecraft to see if the crash stops. A Minecraft Java Runtime misconfiguration is usually due to a mod, and there's an easy way to check which one it might be by re-adding them individually.
  3. Re-add mods one by one until the crash returns — that last mod added is the culprit. Update it or find an alternative compatible with your Minecraft version.

Fix 4: Fix a Windows username with special characters

  1. Check your username. A player's Windows username can sometimes cause the 'Game Ended with Bad State: Exit Code 1' error when it has a special character like an asterisk or exclamation mark.
  2. Right-click your Minecraft Launcher shortcut (create one if needed) and choose Properties, then go to the Shortcut tab.
  3. Edit the Target field. Select the entry of the Target field and append -workDir %ProgramData%.minecraft at the end, being careful not to erase the existing path.
  4. Click OK and relaunch the game via this shortcut. This forces Minecraft to use a working directory without the problem characters from your username.
  5. If that fails, create a new Windows account and ensure the new one doesn't contain any special characters, then try launching from there.

Fix 5: Update graphics drivers

  1. Check your current driver version. Press Win + R, type dxdiag, press Enter, and open the Display tab to see your GPU driver info.
  2. Update via your GPU vendor's app. Use NVIDIA GeForce Experience or AMD Radeon Software to install the latest driver.
  3. Intel GPU users should check Windows Update or Intel's website for newer display drivers, since incompatible or outdated graphics drivers can cause games on Windows computers to malfunction.
  4. Restart your PC after the driver install completes, then relaunch Minecraft.

Fix 6: Increase allocated RAM

  1. Open the Minecraft Launcher and go to Installations, select your profile, then More Options.
  2. Raise the memory allocation. Not enough RAM can sometimes cause Minecraft to crash with exit code 1 — change -Xmx2G (2GB) to -Xmx4G (4GB) or more if you have the spare RAM.
  3. Save and relaunch to test.

Fix 7: Reinstall Minecraft (last resort)

  1. Back up your worlds first. Go to %appdata%\.minecraft\saves and copy this folder somewhere safe.
  2. Uninstall Minecraft from Settings > Installed apps, then reinstall it from the official Minecraft Launcher.
  3. Restore your saves into the new saves folder once reinstalled.

When to seek further help

If the crash log shows a native-code JVM crash (for example, a message stating the crash happened outside the Java Virtual Machine) rather than a mod or Java exception, this can indicate a deeper driver or hardware compatibility issue. In that case, report it through Mojang's official bug tracker or the Minecraft support site with your full crash report attached, since community fixes alone may not resolve native-level crashes.

Heads up: this guide was drafted with AI assistance from the real sources listed below, and structured by our team for clarity. It may not cover every possible cause — if it doesn't fix your issue, let us know and we'll take a closer look.

Was this fix helpful?