Java Runtime Error

The server fails to start with a JNI error or a Java exception before the game even loads. The Java installation itself is broken or unsuitable, reinstalling a clean JDK usually fixes it.

What does this error mean?
A JNI error / early Java exception means the Java runtime could not initialize properly, from a corrupted install, a broken native library, or an incompatible Java build, before any Minecraft code runs.
JNI error / Java exception
Most Common Causes
  • A corrupted or incomplete Java installation.
  • A broken or mismatched native library.
  • An unusual or unstable Java distribution.
  • Conflicting Java versions on PATH.
  • Insufficient permissions to run Java.
How To Diagnose
  1. Run 'java -version' to confirm Java works at all.
  2. Check the error for a named missing/broken library.
  3. Note which Java distribution and version you use.
  4. Try launching with a clean, well-known JDK.
Recommended Fixes
  • Reinstall Java
    Remove the broken install and install a clean JDK for your version.
  • Switch to Temurin
    Use a stable distribution like Eclipse Temurin (Adoptium).
  • Clean up PATH
    Ensure only the intended Java is first on PATH and JAVA_HOME is correct.
  • Check permissions
    Confirm the user has permission to execute Java and read the install.
Frequently Asked Questions

A failure in the Java Native Interface layer, usually meaning Java itself did not start correctly.

A mainstream OpenJDK build such as Temurin, matched to your Minecraft version's Java requirement.

No, it happens before mods load, the Java runtime is the issue.