---
title: "Minecraft \"Exit Code: 1\": What It Means and How to Fix It"
description: "Exit Code 1 means Java stopped before Minecraft could crash cleanly. Find the real error, then fix mods, the Java version, JVM arguments or drivers."
url: "https://www.gameserverkings.com/knowledge-base/minecraft/error-exit-code-1/"
category: "Minecraft"
category_url: "https://www.gameserverkings.com/knowledge-base/minecraft/"
published: "2026-11-28T21:23:26.430Z"
updated: "2026-11-28T23:49:15.051Z"
source_format: "markdown"
site: "GameServerKings"
---

# Minecraft "Exit Code: 1": What It Means and How to Fix It

"Exit Code: 1" means the Java process that runs Minecraft stopped with a generic error before the game could report a crash of its own. The launcher only passes that number on. It is not a cause, and nothing about the number "1" tells you which of half a dozen problems you have. The cause is always written down somewhere else: in a line of text the Java launcher printed, in an error window from your mod loader, or in the game's `logs/latest.log`.

Most cases come down to four things: a mod built for a different Minecraft version or missing a dependency, the wrong Java version in a third-party launcher, a mistyped JVM argument, or a broken game or driver install. This guide shows how to tell which one you have in about two minutes, and fixes each. It is about the game on your own computer. A server that fails the same way is covered in [its own section](#the-same-failure-on-a-server) at the end.

> [!NOTE] Versions and date checked
> Checked on **28 November 2026** against **Java Edition 26.3** (the current release, which needs **Java 25**), Fabric Loader 0.20.1 and the 26.3 client jar itself. Exit Code 1 is a Java Edition error. Bedrock Edition does not show it.

## Why It Is 1 and Not Something Else

Minecraft has its own list of exit codes, and 1 is not on it. The 26.3 client defines them in a class called `ExitCodes`: a normal crash that writes a crash report exits with **-1**, and the other codes the game picks are -2 to -8. All of them are negative.

So when the launcher says **1**, the game's own crash handler almost certainly never ran. Something stopped the process before Minecraft was far enough along to write a crash report, or stopped it on purpose. In practice that is one of these:

| Who exited with 1 | What you see | Typical cause |
|---|---|---|
| The `java` launcher, before the game loaded | `Error: Could not create the Java Virtual Machine.` | A bad JVM argument |
| The `java` launcher, loading the main class | `java.lang.UnsupportedClassVersionError` | Java too old for this Minecraft version |
| Fabric Loader | A Fabric Loader window that says **Failed to launch!**, then Exit Code 1 when you close it | Incompatible or missing mods |
| An uncaught exception very early in startup | A stack trace at the end of `logs/latest.log`, no crash report | Mods, a corrupt install, or a driver |

That table explains a common puzzle: there is often **no file in `crash-reports/`** for an Exit Code 1. That is normal, not a sign that logging failed. The game never got far enough to write one.

> [!TIP] A different number is a different problem
> Exit code **-1** (shown as **255** on macOS and Linux) is the game's own crash handler, and it does leave a crash report. Very large negative numbers on Windows are usually native crashes in the graphics driver or the JVM itself, and those leave an `hs_err_pid<number>.log` file instead. This page is about **1**.

## Step 1: Find the Real Error

Look in three places, in this order.

1. **The window that appeared before the launcher's crash message.** Fabric's **Failed to launch!** window, or a dialog quoting a Java error, is the whole answer. Read it before you close it, or take a screenshot.
2. **`logs/latest.log` in the game folder.** Scroll to the bottom and work upwards to the first line that says `ERROR`, `Exception` or `Caused by`. The last `Caused by:` line is usually the root cause.
3. **`crash-reports/`**, if a file there has the right time stamp. Its name looks like `crash-2026-11-28_14.02.11-client.txt`. If there is no new one, see the section above.

Where the game folder is:

| Launcher | Folder |
|---|---|
| Official launcher on Windows | `%APPDATA%\.minecraft` (paste it into the Run box, **Win + R**) |
| Official launcher on macOS | `~/Library/Application Support/minecraft` |
| Official launcher on Linux | `~/.minecraft` |
| Prism Launcher, the Modrinth App, CurseForge and others | One folder per instance. Use the launcher's **Open folder** option on the instance |

Check the time stamp on `latest.log` before you read it. If it is from yesterday, the game stopped before it could open a log at all. That points at the first two rows of the table above: JVM arguments or the Java version.

## Cause 1: A Mod Problem

On a modded instance this is the most common cause by a wide margin. Fabric Loader checks every mod's declared dependencies before the game starts. If something does not match, it opens its **Failed to launch!** window with **Incompatible mods found!** and exits with code 1 once you close it. That exit is in Fabric Loader's own source code.

The window says exactly what is wrong:

```text title="Fabric Loader error window"
Incompatible mods found!
A potential solution has been determined, this may resolve your problem:
	- Install Fabric API, any version.
```

- **`requires ... which is missing!`** A dependency is not installed. Fabric API is the usual one. Install it, in the version built for your Minecraft version.
- **`is incompatible with ...`** One mod declares that it breaks with another. Update or remove one of them.
- **`but only the wrong version is present`** A mod needs a different version of something you have. Install the version it names.
- **A mod built for another Minecraft version.** A mod for 26.2 often will not load on 26.3. Download files filtered by your exact game version, not the newest file on the page.

Mods that get past the dependency check can still fail at startup. In `latest.log`, look for `Mixin` errors (`could not find any targets matching` means the mod was built for a different version) and for the mod ID in the first `Caused by:` line. [Reading Minecraft Server Logs and Crash Reports](/knowledge-base/minecraft/reading-crash-logs-and-common-errors/) explains how to read Mixin failures and stack traces line by line. It is written for servers, but the client log uses the same format.

**If the log does not name a mod, bisect.** Move half the mods out of the `mods` folder and launch. If the game starts, the problem is in the half you removed. Keep halving until one mod is left. With 60 mods that takes about six launches.

> [!IMPORTANT] Using a modpack? Launch it the way it was built
> A pack from CurseForge or Modrinth fixes the loader version, the mod versions and usually the Java version together. Dropping extra jars into its `mods` folder, or updating single mods inside it, is the fastest way to an Exit Code 1. [How to Use Modrinth](/knowledge-base/minecraft/how-to-use-modrinth/) covers installing and running a pack properly.

## Cause 2: The Wrong Java Version

Minecraft 26.1 and newer needs **Java 25**. The official launcher downloads the right runtime for each version, so this mostly affects third-party launchers, and installations where someone changed **Java executable** to a Java they installed themselves.

On the wrong runtime, `java` stops before the game loads anything:

```text
Error: LinkageError occurred while loading main class net.minecraft.client.main.Main
	java.lang.UnsupportedClassVersionError: net/minecraft/client/main/Main has been compiled by a more recent version of the Java Runtime (class file version 69.0), this version of the Java Runtime only recognizes class file versions up to 65.0
```

That is the exact output from running the 26.3 client on Java 21. Class file version **69** is Java 25, and **65** is Java 21. Subtract 44 from the class file version to get the Java version.

**Fix:** in the official launcher, open **Installations**, choose **Edit** on the installation, open **More Options** and clear any custom **Java executable** so it uses the bundled runtime. In a third-party launcher, set the instance's Java to 25, or let the launcher download it. Too new a Java can also be the problem on old modded versions: packs on 1.12.2, for example, need Java 8.

## Cause 3: A Bad JVM Argument

The **JVM arguments** box under **More Options** is a common culprit, usually after someone pasted a flag set from a video or typed a memory size by hand. A broken argument means the JVM never starts:

```text
Invalid maximum heap size: -Xmx4X
Error: Could not create the Java Virtual Machine.
```

```text
Unrecognized VM option 'UseFooBar'
Error: Could not create the Java Virtual Machine.
```

Both print that second line and exit with code 1, and the game writes no log. A heap that is too small, such as `-Xmx4`, prints `Too small maximum heap` instead, with the same exit code. The usual mistakes:

- **A wrong memory unit.** `-Xmx4G` is correct. `-Xmx4`, `-Xmx4GB` and `-Xmx 4G` are not.
- **More memory than the machine has.** Allocating 12 GB on an 8 GB laptop either fails at startup or makes the system swap. [How Much RAM to Allocate to the Minecraft Launcher](/knowledge-base/minecraft/allocating-client-ram/) has the sizing, and it is usually 2 to 4 GB.
- **Flags for a different Java version.** Old tuning flags that Java 25 no longer recognises produce `Unrecognized VM option`.

**Fix:** change only the number in `-Xmx`, or restore the default arguments (delete the installation and create a new one if you cannot remember them).

## Cause 4: A Broken Install, Drivers or the Graphics API

If you are on vanilla with default settings and still get Exit Code 1, work through these in order:

1. **Update the graphics driver** from NVIDIA, AMD or Intel directly, not through Windows Update.
2. **Check the Graphics API setting.** Java 26.3 has a **Graphics API** option under **Options → Video Settings** with **Default**, **Prefer OpenGL** and **Prefer Vulkan (Experimental)**. If you switched it to Vulkan and the game now dies at startup, edit the setting back to Default or Prefer OpenGL. In 26.3 the game switches the setting itself after it detects a startup crash. Mojang's notes for the 26.4 snapshots say that automatic switch is being removed, so check this one first once 26.4 is out. [Why Is My Minecraft So Laggy?](/knowledge-base/minecraft/why-is-my-minecraft-so-laggy/) covers the setting in full.
3. **Remove resource packs and shaders** by moving the files out of `resourcepacks/` and `shaderpacks/`, then launch.
4. **Check the folder path.** Mojang's help centre warns that the launcher can fail when the Windows user name contains special characters, and its fix is to give the launcher a separate working directory whose path has none. If your user name has accents or symbols in it, try that.
5. **Reinstall.** Back up `saves/` first. That folder holds your singleplayer worlds, and they are the only thing in `.minecraft` you cannot download again.

> [!NOTE] Older guides mention GLFW errors
> Advice about `GLFW error 65542` refers to the window library Minecraft used up to 26.2. The 26.3 release replaced GLFW with **SDL3** for windows and input, so that particular message no longer appears on the current version.

## The Same Failure on a Server

A Minecraft server runs on the same Java, so the same mechanisms stop it, and the console shows the same text the client log would:

- **`UnsupportedClassVersionError`** on a server means its Java runtime is too old for the server jar, or for one plugin or mod. On a [GameServerKings Minecraft server](/games/minecraft/), change the Java version with the **Docker Image** selector on the **Startup** tab. [Reading Minecraft Server Logs and Crash Reports](/knowledge-base/minecraft/reading-crash-logs-and-common-errors/) has the version table.
- **Fabric's `Incompatible mods found!`** prints to the server console in the same format, with the same "potential solution" lines underneath. Follow them as written.
- **One line, then nothing** is the server-side version of Cause 3, but for the jar rather than the JVM. [Minecraft Server Won't Start](/knowledge-base/minecraft/why-wont-my-server-start/) triages by the last line the console printed.

One difference matters. Exit Code 1 on **your** game never means the server is broken, even if it happens as you click **Join**. A client that dies when connecting usually has a mod that the server's mod list does not match. [Minecraft "Network Protocol Error"](/knowledge-base/minecraft/error-network-protocol-error/) and [Minecraft Players Can't Connect](/knowledge-base/minecraft/players-cant-connect/) cover those failures.

## What to Read Next

- [Reading Minecraft Server Logs and Crash Reports](/knowledge-base/minecraft/reading-crash-logs-and-common-errors/): reading a stack trace, Mixin failures and missing dependencies
- [How Much RAM to Allocate to the Minecraft Launcher](/knowledge-base/minecraft/allocating-client-ram/): the `-Xmx` setting, and why more is not better
- [Why Is My Minecraft So Laggy?](/knowledge-base/minecraft/why-is-my-minecraft-so-laggy/): FPS, stutter, performance mods and the Vulkan setting
- [How to Use Modrinth](/knowledge-base/minecraft/how-to-use-modrinth/): installing a modpack so the versions match
- [Minecraft Server Won't Start](/knowledge-base/minecraft/why-wont-my-server-start/): the server-side version of this problem
- [Minecraft "Network Protocol Error"](/knowledge-base/minecraft/error-network-protocol-error/): when the game disconnects instead of crashing

**Sources** (checked 28 November 2026): the Minecraft 26.3 client jar from Mojang's version manifest (`ExitCodes` constants and the Java 25 requirement); output from `java` run against that jar; Fabric Loader source (`FabricGuiEntry` and `Messages.properties`) on GitHub; Mojang's [Minecraft Java Edition 26.3](https://www.minecraft.net/en-us/article/minecraft-java-edition-26-3) and [26.4 Snapshot 1](https://www.minecraft.net/en-us/article/minecraft-26-4-snapshot-1) notes.

---

Made with 💜 by GameServerKings
