The JNI pop-up is only a wrapper. Read the exception directly below it: if it says UnsupportedClassVersionError, run that server, mod loader, or JAR with the Java version its publisher requires. If a fresh unmodified Minecraft installation opens, leave the launcher's bundled Java alone and repair only the third-party profile or JAR.
Keep the launcher, terminal, or server window open and copy the first exception shown after “A JNI error has occurred.” Record the Minecraft version and whether you launched the official game, a custom installation, a mod installer, or a server JAR; the pop-up alone does not identify the fix.
2
Test a clean Minecraft installation
In the official Minecraft Launcher, select Minecraft: Java Edition > Installations > New installation. Choose the same game version as the failing profile, give the test a clear name, install it, and launch it without mods or custom JVM arguments. If it opens, stop changing the launcher: the failure belongs to the custom profile, loader, mod, or JAR.
3
Match an UnsupportedClassVersionError
Use this branch only when the copied text names UnsupportedClassVersionError. Read the server, loader, or mod publisher's requirement for that exact release, then run it with that Java version. Do not install whatever Java version is newest or replace the official launcher's bundled runtime for an unrelated external JAR.
4
Check Java for a server or installer JAR
Open Command Prompt and run `java -version`, then compare the result with the JAR publisher's requirement. Use the publisher's supported Java distribution and command for that JAR; changing the system PATH or JAVA_HOME globally is unnecessary when one explicit Java executable can launch it.
5
Repair only the component named by another exception
If the next line names a missing class, mod, loader, or different exception, use that component publisher's compatibility or dependency instructions. Keep a world backup, remove only the mismatched addition, and retest the clean profile before reinstalling Minecraft.
Launch the same profile, installer, or server JAR that failed. Success means that target starts without the JNI pop-up; a clean vanilla launch proves only the launcher branch. If it still fails, send its publisher the complete exception, Minecraft version, loader or JAR version, and `java -version` result.
If it does not work
If `java` is not recognized in Command Prompt, follow the server, loader, or installer publisher's Windows Java setup instructions. The official Minecraft Launcher can still use its own bundled runtime.
If a fresh installation for the same Minecraft version also fails, preserve the worlds before using Minecraft Help's launcher repair or reinstall guidance. Do not delete the `.minecraft` folder as a first step.
If an older modpack needs a different Java release than a current server, keep their launch commands or launcher installations separate instead of changing one global runtime back and forth.
If the exception text does not mention UnsupportedClassVersionError, do not assume that installing Java fixes it. The named exception or component determines the next branch.
ⓘ Sources and verification
Checked against official documentation on . Scope: Windows PC.
Source-checked against current Oracle, Minecraft, and Fabric documentation. The page is deliberately image-free: the decisive evidence is selectable exception text, while Minecraft's clean-installation controls are named in order and verified by whether the same target launches.