The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
The message “A JNI error has occurred, please check your installation and try again” is not a diagnosis. It is Java’s generic startup warning. Read the exception immediately below it: if the trace contains UnsupportedClassVersionError, the Java runtime that actually launched Minecraft is too old for the game’s compiled classes, or the launcher selected an incompatible runtime. Identify the exact Minecraft release first, then match the Java major version required by that release.
This process applies separately to the game client, a locally run server JAR, and a hosted server. Installing Java globally does not necessarily change the executable used by a launcher, script, or hosting panel.
| # | Preview | Product | Price | |
|---|---|---|---|---|
| 1 |
|
Minecraft | Java & Bedrock Deluxe Collection | Windows Digital Code | $39.99 | Buy on Amazon |
| 2 |
|
Minecraft | Java & Bedrock Ultimate Collection | Windows Digital Code | $49.99 | Buy on Amazon |
| 3 |
|
Minecraft | Standard Edition | XBOX Digital Code | $19.99 | Buy on Amazon |
| 4 |
|
Minecraft | $6.99 | Buy on Amazon |
| 5 |
|
Minecraft - Bedrock Edition PS4 | $42.98 | Buy on Amazon |
What the Minecraft JNI message actually tells you
JNI is Java’s native interface layer. Minecraft reaches that layer while Java is starting the application, so a failure there can produce the same headline for several different startup problems. The headline alone cannot tell you whether the issue is a Java-version mismatch, a bad runtime path, a damaged installation, or another exception.
Mojang’s issue report MC-225505 shows why the next lines matter. In the reported case, the headline was followed by UnsupportedClassVersionError and class-file version details. Those details identified a compatibility problem between the classes Minecraft was trying to load and the Java runtime selected to run them.
#1 Best Overall
- DELUXE COLLECTION — Includes Minecraft: Java & Bedrock Edition, three Bedrock add-ons, three exclusive Character Creator items, and 700 Minecoins.
- CREATE YOUR WORLD — Build whatever you imagine in an infinite world that’s unique in every playthrough.
- EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world filled with surprises.
- SURVIVE THE ADVENTURE — Face mysterious foes, travel across exciting landscapes, and venture into perilous dimensions.
- PLAY TOGETHER — Play cross-platform with friends in Bedrock Edition on console, mobile, and PC, or join community servers in Java Edition on PC, Mac, and Linux. Online console multiplayer requires a platform-specific subscription (sold separately).
Do not change graphics settings, buy hardware, or reinstall the entire game before reading that trace. A class-version error points to Java selection and compatibility, not to GPU capacity.
Start by recording the release and launch path
Java requirements are tied to a Minecraft release, not to the word “Minecraft” in general. Before changing anything, write down these three facts:
- Exact game version: record the release or snapshot shown in the launcher profile, the version directory, or the server JAR name. “Java Edition” is not specific enough.
- What failed: distinguish the desktop client from a local server JAR or a server hosted by a control panel.
- Which launcher or command started it: note the official Launcher, a third-party launcher, a shell or batch script, or a hosting provider’s startup setting.
A profile can point to a different version than the one you last played. A server startup script can also call an absolute Java path while your operating system’s default java command points somewhere else. These distinctions determine which runtime you must inspect.
Rank #2
- ULTIMATE COLLECTION — Includes Minecraft: Java & Bedrock Edition, five Bedrock add-ons, five exclusive Character Creator items, and 1000 Minecoins.
- CREATE YOUR WORLD — Build whatever you imagine in an infinite world that’s unique in every playthrough.
- EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world filled with surprises.
- SURVIVE THE ADVENTURE — Face mysterious foes, travel across exciting landscapes, and venture into perilous dimensions.
- PLAY TOGETHER — Play cross-platform with friends in Bedrock Edition on console, mobile, and PC, or join community servers in Java Edition on PC, Mac, and Linux. Online console multiplayer requires a platform-specific subscription (sold separately).
Read the complete exception, not just the first line
Expand the launcher log or terminal output and copy the first exception plus its “Caused by” lines. Search the text for these clues:
UnsupportedClassVersionErrormeans Java found a class compiled for a newer class-file level than the runtime understands.Could not create the Java Virtual Machineindicates a different startup failure; the options and following message are needed.- Native-library, memory, permissions, or missing-file messages require a different branch of troubleshooting.
The Mojang tracker example records classes at class-file version 60.0 while the selected runtime recognized versions only through 52.0. The important comparison is the expected class version versus the maximum version understood by the runtime; the larger expected value proves that runtime is too old for that build. Your numbers may differ.
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: ...
... class file version 60.0, this version of the Java Runtime only recognizes class file versions up to 52.0
If UnsupportedClassVersionError is absent, do not force a version-mismatch explanation. Follow the actual exception and launcher log instead.
Recommended Free Tools
Rank #3
- CREATE YOUR WORLD — Build whatever you imagine in an infinite world that is unique in every playthrough.
- EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world full of surprises.
- SURVIVAL ADVENTURES — Face mysterious foes, travel across varied landscapes, and venture into perilous dimensions.
- PLAY TOGETHER — Play solo or join friends in local split-screen and cross-platform play across console, mobile, and PC. Online multiplayer supports up to 8 players.
- COMMUNITY PLAY — Connect with players on community servers, or subscribe to Realms Plus (sold separately) to play with up to 10 friends on a private server.
Match Java to the Minecraft version
The following requirements are explicitly stated in Mojang release material. They are not a universal rule for every historical version.
| Minecraft release | Java information | Practical implication |
|---|---|---|
| Java Edition 1.18 | Java 17 is used. Mojang says custom Java setups and third-party launchers must use Java 17 or later. | Use a Java 17-or-newer runtime that the 1.18 installation can run with; the default official Launcher is intended to supply the correct runtime. |
| Java Edition 26.1 | The official 26.1 notes say, “The game now requires Java 25,” and include Microsoft OpenJDK 25. | Use Java 25 for that release, preferably the runtime supplied with the official Launcher unless you have a reason to manage Java yourself. |
| Other releases | Not established by the two release notes above. | Check the release’s own notes and the Minecraft Java Edition system requirements; do not infer a requirement from 1.18 or 26.1. |
Mojang’s 1.18 pre-release notes state: “If you are using a custom Java setup or a third-party launcher, you will need to ensure that your Java installation is version 17 or above.” The 26.1 release notes separately state that the game requires Java 25. Treat both statements as release-specific.
“Install the newest Java” is not a safe universal fix. Minecraft versions can have different compatibility boundaries, and the Mojang tracker includes a historical Launcher case in which a newer runtime was flagged as incompatible with an older game version. Select the major version supported by your exact release and launcher.
Rank #4
- Skins! We have biome settlers, city folk, town folk, and more!
- The Nether and all its inhabitants. Fight Ghasts and make friends with Pigmen
- Cross platform play for up to five players between Pocket Edition and Windows 10
- Revamped touch controls, controller support, and a controller mapping screen
- Enhanced Weather effects! Accumulating snow and more
Fix a client launched by the official Minecraft Launcher
The official Launcher’s default setup is the least complicated path. Mojang’s 1.18 notes say the default Launcher downloads and installs the correct Java runtime. First restore the profile to that managed runtime rather than pointing it at an arbitrary system installation.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
- Open the official Launcher and select Installations.
- Find the profile for the exact Minecraft version that failed, then open its edit or configuration screen.
- Expand the advanced or More Options area and inspect the Java executable or Java runtime field. Labels vary by Launcher release.
- If the profile has been manually changed, remove the custom executable path or select the Launcher-managed runtime, then save the profile.
- Launch that profile once and read the log again. Confirm that the exception is gone before changing unrelated settings.
A shell check such as java -version only reports the Java found on your operating system’s PATH. It may not be the runtime selected inside the official Launcher. Use it as a system check, not as proof of what the Launcher used.
When the managed runtime is missing or damaged
If the profile is configured for the managed runtime but the Launcher cannot start it, note the exact path and error shown in the log. Repair the Launcher installation or let it download the runtime again using the Launcher’s own account and installation settings. Avoid deleting random Java folders or removing every Java installation as a first response; those actions can break other profiles and server scripts without addressing the selected path.
Best Value
- Play and share with friends on console, mobile and Windows 10
- discover community creations in the new in-game store
- access new mini games and game modes through servers
Fix a custom or third-party launcher
Custom launchers commonly let each instance select its own executable. Installing Java 17 or Java 25 does nothing if the instance still points to an older binary.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →- Open the launcher’s instance or profile settings, not just its global preferences.
- Locate the Java executable field and record the full path currently selected.
- Run that exact executable with
-version. On Windows, a path containing spaces needs quotes, for example"C:Pathtojava.exe" -version; on macOS or Linux, use"/path/to/java" -version. - Compare the reported major version with the requirement for the Minecraft release. For 1.18, the documented custom-launcher requirement is Java 17 or above; for 26.1, the documented requirement is Java 25.
- Select a compatible installation in the instance settings, save, and launch again. Keep the old runtime available until every older profile has been tested.
Do not assume that the launcher’s download page, your shell’s PATH, and the instance’s Java field refer to the same installation. The executable path in the failing profile is the authoritative item for this check.
Fix a local server JAR
A server JAR uses whichever executable appears in the command, script, scheduled task, or service definition. Check that launch path directly.
- Open the script or command used to start the server. Typical forms include
java -jar server.jaror an absolute path such as"C:Javabinjava.exe" -jar server.jar. - Run the exact executable from that command with
-version. If the command uses onlyjava, check the shell resolution:where javaon Windows orwhich javaon macOS/Linux. - On macOS/Linux,
readlink -f "$(which java)"can reveal the resolved binary when the platform providesreadlink. On Windows, inspect everyjava.exereturned bywhere javaand the script’s working directory. - Compare that runtime with the exact server release. A server JAR built for a newer Java class level cannot be made compatible by changing client graphics or allocating more RAM.
- Update the script to the intended executable, restart the server, and preserve the command in your service or scheduler so a later reboot does not select a different Java installation.
If a hosting panel starts the server, the panel’s Java selector or container image controls the runtime. Ask the host which Java executable and major version are used, or inspect the startup log if it prints the command. Installing Java on your own computer does not change a remote host.
If the detailed exception is not a class-version error
The generic JNI headline can accompany other Java startup failures. Use the next exception as the decision point:
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware match- Memory or virtual-machine option errors: remove or correct invalid flags and verify that the selected Java major version accepts the options. Do not copy flags from an unrelated version.
- Missing file or permission errors: check the profile directory, server working directory, file permissions, and antivirus quarantine. The error should name the missing path or denied operation.
- Native-library or architecture errors: check whether the Java installation and operating system architecture match, and follow the named library’s error rather than changing class versions.
- Launcher authentication or download errors: repair the launcher account or download path. These are not diagnosed by
UnsupportedClassVersionError.
Keep the full log when asking for help. Include the Minecraft version, operating system, launcher or hosting method, Java executable path, Java version output, and the complete exception. Remove account tokens and personal paths before posting it publicly.
Quick Recap
Common mistakes that make the problem harder
- Fixing the headline instead of the exception: “JNI” is a layer, not a root cause. The following exception determines the branch.
- Checking the wrong Java:
java -versionin a terminal may not describe the Launcher profile or remote host. - Using one Java version for every installation: release requirements differ, and a newer runtime can be rejected by an older profile.
- Deleting all Java installations: this can break unrelated tools and scripts. Change only the executable used by the failing launch path.
- Reinstalling Minecraft first: a clean game download does not correct a script or profile that still points to an incompatible runtime.
- Changing graphics settings: class-file compatibility is established before rendering starts, so graphics options cannot repair it.
A compact decision checklist
- Write down the exact Minecraft release and whether the failure is a client, local server, or hosted server.
- Open the complete log and locate the exception below the JNI headline.
- If it says
UnsupportedClassVersionError, compare the class-file versions shown and verify the Java executable actually being used. - For 1.18, provide Java 17 or later for custom setups; for 26.1, provide Java 25. For other releases, consult that release’s documentation.
- For the official Launcher, prefer its managed runtime. For custom launchers and servers, change the instance field or startup command that selects Java.
- Restart and confirm the new log. If the exception differs, stop treating it as a version mismatch and follow the new error text.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

