Direct answer
Check the actual exception below the JNI message, especially Java version and class compatibility errors.
Diagnosis to use: “A JNI error has occurred” often accompanies a more specific Java exception, frequently an unsupported class-file major version.
What it means
“A JNI error has occurred” is often a launcher-level summary. The useful cause is usually the exception immediately below it, such as an unsupported class version or another startup/class-loading failure.
What to collect: Collect the entire output after “Please check your installation and try again”, then run java -version using the same executable that the host’s panel or startup script uses.
If you are a player
- This is a server-side startup problem. Send the owner the exact panel/console error; reinstalling your game client will not fix it.
If you run the server
- Read the first Java/JVM error before the final “server stopped” or panel exit-code summary.
- Run
java -versionin the same shell/container/panel runtime that actually launches the server. - Verify the Java release and JVM arguments against the exact server software/version; remove old or copied flags that the current runtime rejects.
- Fix startup/runtime selection before changing world or plugin data, because Minecraft may not have started yet.
Targeted repair: If the nested cause is UnsupportedClassVersionError, select the Java release required by that Minecraft/server build. If another exception is named, fix that cause instead; JNI is not a diagnosis by itself.
Verify after the change: Restart from the same script or panel after selecting the correct Java executable and verify the server reaches its normal ready message.
Important notes
- “A JNI error has occurred” is often only a launcher summary. The exception immediately after it is the useful diagnosis, commonly a Java/class compatibility problem.
Current Paper Java requirements
Paper currently documents Java 21 for Paper 1.20 through 1.21.11 and Java 25 for Paper 26.1+. Other server software or older Minecraft versions can require a different Java release, so check that project’s exact version table.
References
Use the documentation for the exact software and release you run. These sources support the settings or diagnostic behavior used in this fix.
- Oracle Java launcher reference
- PaperMC: Getting started / Java requirements
- PaperMC: Basic troubleshooting
Related fixes and guides
Help us improve this article
Tell us what is missing, unclear, outdated, or incorrect. You can also suggest something we should add.