Solved Error
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.
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.
Step-by-Step Guide
Fix 1: Check the crash log for the real cause
- 1Open the log folder. Press Win + R, type
%appdata%, hit Enter, then open the.minecraftfolder followed by the logs folder. - 2Open the latest log file. Navigate to the
.minecraftfolder, open the Logs folder, open thelatest.txtfile, and check the logs for a problem with any mod. - 3Search for keywords. Search for lines mentioning ERROR or Exception — this can point you directly to the faulty mod or config.
Fix 2: Reinstall Java
- 1Uninstall the current Java version. Open Start, type Add or Remove Programs, find Java, and uninstall it.
- 2Install a fresh copy. Download the latest Java 17 from the official Java site.
- 3Restart your computer before relaunching Minecraft, since this reset resolves the issue for a large share of players.
- 4Alternative — 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(notjavaw.exe) file, then Save.
Fix 3: Disable or remove mods
- 1Back up your mods folder first. Press Win + R, type
%appdata%\.minecraft, and open the mods folder. - 2Remove mods and relaunch vanilla Minecraft. 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.
- 3Re-add mods individually to find culprit. 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
- 1Check 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.
- 2Access Minecraft Launcher shortcut properties. Right-click your Minecraft Launcher shortcut (create one if needed) and choose Properties, then go to the Shortcut tab.
- 3Edit the Target field. Select the entry of the Target field and append
-workDir %ProgramData%\.minecraftat the end, being careful not to erase the existing path. - 4Click OK and relaunch the game via this shortcut. This forces Minecraft to use a working directory without the problem characters from your username.
- 5Create new Windows account without special characters. 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
- 1Check your current driver version. Press Win + R, type
dxdiag, press Enter, and open the Display tab to see your GPU driver info. - 2Update via your GPU vendor's app. Use NVIDIA GeForce Experience or AMD Radeon Software to install the latest driver.
- 3Update graphics drivers from Windows or Intel. 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.
- 4Restart PC and relaunch Minecraft. Restart your PC after the driver install completes, then relaunch Minecraft.
Fix 6: Increase allocated RAM
- 1Open Minecraft Launcher and access More Options. Open the Minecraft Launcher and go to Installations, select your profile, then More Options.
- 2Raise 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. - 3Save changes and relaunch to test. Save and relaunch to test.
Fix 7: Reinstall Minecraft (last resort)
- 1Back up your worlds first. Go to
%appdata%\.minecraft\savesand copy this folder somewhere safe. - 2Uninstall and reinstall Minecraft. Uninstall Minecraft from Settings > Installed apps, then reinstall it from the official Minecraft Launcher.
- 3Restore your saves to new saves folder. 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.
Sources:
- Minecraft Exit Code 1 Error Fix | Shockbyte
- How To Fix Minecraft Exit Code 1 Error - NameHero
- How to fix Minecraft exit code 1 - Sportskeeda
- 6 Ways to Fix Minecraft's 'Exit Code: 1' on Windows - MakeUseOf
- How to Fix a Minecraft 'Exit Code: 1' Error? 5 Solutions - Help Desk Geek
- Minecraft Exit Code 1 error: What is it and how to fix it - Android Authority
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. See how we create our fixes.
Was this fix helpful?
Related Error Fixes
- How to Fix Minecraft 'Failed to Authenticate Your Connection'Minecraft
- How to Fix Minecraft Error 0x803F8001 - Not Available in Your AccountMinecraft
- How to Fix: Minecraft "Connection Lost" ErrorMinecraft
- Fix: Halo: Campaign Evolved Crashing on Startup (PC)Halo: Campaign Evolved
- How to Fix Epic Games Launcher Error LS-0013 (Launch Failed)Epic Games