How do you fix error a JNI error has occurred Please check your installation and try again?

As many fans are aware, Minecraft Caves & Cliffs update was recently released. This highly anticipated update contained a myriad of new features, including new mobs, blocks, items, and achievements.

Unlike previous versions, Minecraft server software now relies on the latest version of Java (Java 16) in order to function correctly. The most common cause of the JNI error while trying to set up a Minecraft server is due to the Java version installed on the machine being outdated.

Fortunately, it's easy enough to fix this issue via simply updating Java. This will only take a few minutes at the most, and all the relevant steps will be carefully explained below.


Why are players getting a JNI Error while trying to set up a Minecraft server?

Previous versions of Minecraft carried server software that was compatible with older versions of Java. However, this was not the case with the latest Minecraft update, which now requires Java in order to launch and run correctly. Players can download the latest version of Java and install it to avoid any JNI errors in the game.

This is why players who have successfully run Minecraft servers in the past with older versions may now be seeing this error upon trying to set up a 1.17 server.

How do you fix error a JNI error has occurred Please check your installation and try again?
Minecraft players who are using an outdated version of Java will be greeted with this message

How can players fix the JNI Error?

In most cases, the JNI error can be fixed simply by updating Java on the device to match the latest release. In this case, it's Java 16.

Players can follow the steps below in order to complete the installation of Java 16 for Minecraft:

Step 1.)

The first step is to download the Java 16 installer. Players can easily do this by visiting the official Oracle website. Oracle are the creators of Java, and direct downloads for Java 16 can be found here.

Players can select their correct download based on whether they are on a Windows or Mac machine. The majority of Windows users will want to download the file ending with .exe, as shown in the image below.

How do you fix error a JNI error has occurred Please check your installation and try again?
Windows users will want to download this version of the Java 16 installer

Step 2.)

After successfully downloading the Java 16 installer, players now need to install the software on their machine. This process can be initiated by simply double-clicking the executable file that has been downloaded and allowing the installer to make changes if asked.

Step 3.)

After the installer has been launched, it's smooth sailing from there. All players need to do is hit the "next" button a few times, and the installer should do the rest.

Once complete and fully installed, players should be greeted with the message below. The JNI error should now be fixed, and players can try launching the 1.17 Minecraft server software.

How do you fix error a JNI error has occurred Please check your installation and try again?
This screen should be displayed upon successful installation of Java 16

How do you fix error a JNI error has occurred Please check your installation and try again?


Also read: How to copy and paste using WorldEdit in Minecraft


Rate this story!

Thank You!

Edited by Rachel Syiemlieh

Some Minecraft users are seeing an error whenever they attempt to launch the client (the game) or the server (.jar). The error message that comes up is: “A JNI error has occurred, please check your installation and try again”. This problem is mostly reported to occur with version Minecraft version 21w19a and newer and it’s confirmed to appear on Windows 7, Windows 8.1, Windows 10, and Windows 11.

How do you fix error a JNI error has occurred Please check your installation and try again?
JNI error has occurred in Minecraft

As it turns out, there are multiple causes that might trigger this error when certain users attempt to launch Minecraft and almost each of them is related to the Java installation.

Here’s a list of possible culprits that are most likely responsible for causing the “A JNI error has occurred, please check your installation and try again”:

  • Java 16 JDK is missing – If you get this error while attempting to launch Minecraft build 21w19 or newer, the first thing you should do is check if the Java 16 JDK installation is missing from your PC. This is the most popular reason why this error is encountered when launching Minecraft on PC. If the Java 16 JDK is missing from your computer installation, download and install it from the official channels.
  • Broken System Path for Java – As it turns out, another reason why you can expect to see this error is a scenario in which the system variable path for java is broken and tricks the Minecraft launcher into believing that Java is not installed on your PC when it actually is. If this scenario is applicable, you should be able to fix the issue by removing the broken system PATH variable from the Environment variables.

Install the latest Java JDK version

In most documented cases, this particular error happens when you attempt to launch Minecraft or a Minecraft server on a PC that doesn’t have Java 16 or newer installed. Keep in mind that starting with Minecraft build 21w19, you will need to have Java’s 16 JDK version installed on your PC, otherwise, the game will not launch.

To fix this issue, you will simply need to update your current Java JDK to the most recent version available using the official channels.

If you’re looking for step by step instructions on how to do this, follow the guide below:

  1. Ensure that the Minecraft launcher (Tlauncher or any other) is completely closed before moving to the next step below.
  2. Open your default browser and visit the download page of the Java 15 Development kit.
  3. Once you’re inside, make sure the Windows tab is selected, then scroll all the way down to the Windows x64 Compressed archive and click on the associate Download hyperlink.
    How do you fix error a JNI error has occurred Please check your installation and try again?
    Downloading the x65 compressed archive of the Java 16 JDK
  4. At the confirmation prompt, check the box associated with I reviewed and accept the Oracle Technology Network License Agreement for Oracle Java SE, then click on the Download button below.
  5. Wait until the download is complete, then unpack the zip archive with WinZip, WinRar, 7Zip or the built-in equivalent and wait for the operation to complete.
    How do you fix error a JNI error has occurred Please check your installation and try again?
    Unzip the Java JDK
  6. Once the extraction process is complete, navigate to the location where you extracted the JDK and copy it on your clipboard by right-clicking on it and choosing Copy from the context menu.
  7. Next, use File Explorer (My Computer) to navigate to the following location and paste the JDK 16 folder that you previously copied:C:\Program Files\Java
  8. Wait until the copying operation is complete, then close the window and double-click on your Minecraft launcher once again (TLauncher or other).
  9. Once you’re inside the launcher, click on the settings icon, then click on Settings from the context menu.
    How do you fix error a JNI error has occurred Please check your installation and try again?
    Accessing the Settings menu of the Minecraft launcher
  10. Inside the Settings menu, ensure that the Minecraft Settings is selected at the top, then click the Browse button associated with Java path.
  11. Next, use the browse window to navigate to the following location:C:\Program Files\Java\jdk-16.0.2\bin
  12. Once inside, make sure that javaw.exe is selected before clicking the Open button.
  13. Finally, click on the Save button to successfully save the java path in your Minecraft launcher.
  14. Launch the game normally and you should see the issue fixed.

If the problem is still not resolved, move down to the next potential fix below.

Remove the broken System Path variable for Java

If the first method was not effective in your case, the next thing you should investigate is a potentially broken system variable used by Java.

A broken variable can be the determining factor in ‘tricking’ your Minecraft launcher into believing that the Java JDK requirement for the game is not installed when it actually is.

In this case, you can get the issue resolved by accessing the System Properties screen and modifying the Environment variables in a way that the Java PATH environment is removed.

This fix has been confirmed to be effective for a lot of Minecraft users that we’re encountering the “A JNI error has occurred, please check your installation and try again” when attempting to launch the game from a dedicated launcher.

Follow the instructions below for a step-by-step guide that will guide you through the process of removing the corrupted Java JDK path variable:

Note: The instructions below should work on every recent Windows version including Windows 7, Windows 8.1, Windows 10, and Windows 11.

  1. Press Windows key + R to open up a Run dialog box. Next, type ‘sysdm.cpl’ inside the text box and press Enter to open up the System Properties window.
    How do you fix error a JNI error has occurred Please check your installation and try again?
    Open up the System Properties window

    Note: If you are prompted by the User Account Control prompt, click Yes to grant admin access.

  2. Once you’re finally inside the System Properties window, click on the Advanced tab, then click on Environment variables (under Startup and Recovery).
    How do you fix error a JNI error has occurred Please check your installation and try again?
    Open up System Variables menu
  3. Once you’re inside the System Variables window, go to System Variables, then choose Path and click on Edit.
    How do you fix error a JNI error has occurred Please check your installation and try again?
    Editing the path variable
  4. Next, once you’re inside the Edit environment variable window, go ahead and look for an environment variable that mentions java.
  5. Once you spot the culprit, click on it once to select it, then click Delete to get rid of it.
    How do you fix error a JNI error has occurred Please check your installation and try again?
    Deleting the java environment variable
  6. Once the problematic environment variable has been deleted, reboot your PC, then start Minecraft again and see if the “A JNI error has occurred, please check your installation and try again” issue is now fixed.

How do you fix error a JNI error has occurred Please check your installation and try again?

Kamil is a certified MCITP, CCNA (W), CCNA (S) and a former British Computer Society Member with over 9 years of experience Configuring, Deploying and Managing Switches, Firewalls and Domain Controllers also an old-school still active on FreeNode.

How do you fix a JNI error has occurred Please check your installation?

This a JNI error has occurred Minecraft server error occurs when you try to start Minecraft or a Minecraft server on a PC that does not have the latest version installed. To fix this, you just need to update your current Java to the latest version.

How do I fix error a JNI error has occurred?

Fix JNI Error in Minecraft (2022).
Update And Install Latest Java Version (Windows, Mac, and Linux).
Reset Java Path to Fix Minecraft JNI Error (Windows Only).
Install Java on Linux to Fix Minecraft Errors..
Uninstall Old Versions of Java on Your PC (Optional).