Some Minecraft users see an error every time they try to start the client (the game) or the server (.jar). The error message displayed is: “A JNI error has occurred, please check your installation and try again.”. This issue is primarily reported with Minecraft version 21w19a and newer and has been shown to occur on Windows 7, Windows 8.1, Windows 10 and Windows 11.
It turns out that multiple causes can trigger this error when some users try to launch Minecraft and almost all of them are related to installing Java.
Here is a list of possible culprits likely responsible for causing it “A JNI error has occurred, please check your installation and try again”:
- Java 16 JDK is missing – If you get this error when trying to run Minecraft Build 21w19 or higher, the first thing you should check is if the Java 16 JDK installation is missing on your PC. This is the most common reason why this error occurs when launching Minecraft on PC. If Java JDK 16 is missing from your computer installation, please download and install it from official channels.
- Incorrect system path for Java – It turns out that another reason why you can expect this error is a scenario where the system variable path for Java is corrupted, causing the Minecraft launcher to think that Java is not installed on your PC when in fact it is the case is. If this scenario applies, you should be able to fix the problem by removing the broken PATH system variable from your environment variables.
Install the latest version of Java JDK
In most documented cases, this particular error occurs when trying to start Minecraft or a Minecraft server on a PC that doesn’t have Java 16 or higher installed. Please note that starting with Minecraft Build 21w19, Java JDK version 16 must be installed on your PC; otherwise the game will not start.
To fix this problem, you simply need to update your current Java JDK to the latest version available through official channels.
If you are looking for a step-by-step guide on how to do this, follow the guide below:
- make sure that Minecraft rocket launcher (rocket launcher or another) is fully closed before proceeding to the next step.
- Open your default browser and visit the Java 15 SDK download page.
- Inside, make sure the Windows tab is selected, then scroll down to it Compressed Windows x64 file and click on the corresponding one Download hyperlinks.
- When prompted for confirmation, select the associated check box I have read and accept the Oracle Technology Network License Agreement for Oracle Java SEthen click on the Download bottom button.
- Wait for the download to complete, then unzip the zip file using WinZip, WinRar, 7Zip or the built-in equivalent and wait for the process to complete.
- After the extraction process is complete, navigate to where you extracted the JDK and copy it to your clipboard by right-clicking on it and selecting Copy from the context menu.
- then use Binder researcher (My computer) to navigate to the following location and paste the previously copied JDK 16 folder:
- Wait for the copying process to finish, then close the window and double-click your Minecraft launcher (TLauncher or other) again.
- From the launcher, click the settings icon and then click settings from the context menu.
- Inside settings make sure Minecraft Settings is selected at the top, then click Browse button connected with Java route.
- Then use the navigation pane to navigate to the following location:
- Inside, make sure javaw.exe is selected before clicking Open minded Button.
- Finally click on the Save on computer Button to successfully save java path in your minecraft launcher.
- Launch the game normally and the issue should be resolved.
If the issue is still not resolved, continue to the next possible solution below.
Remove the broken system path variable for Java
If the first method wasn’t effective in your case, the next thing you need to investigate is a possibly corrupted system variable used by Java.
A broken variable can be the key factor causing the Minecraft launcher to think that the game’s Java JDK requirement isn’t installed when it actually is.
In this case, you can fix the problem by going to the System Properties screen and changing the environment variables to remove the Java PATH environment.
This solution has proven to be effective for many Minecraft users, which we found in “A JNI error has occurred. Please check your installation and try again.‘ when trying 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 corrupted Java JDK path variables:
Note: The instructions below should work on all recent versions of Windows including Windows 7, Windows 8.1, Windows 10 and Windows 11.
- Hurry Windows key + R open a Class dialog box. then write ‘sysdm.cpl’ in the text field and press come in to open the system properties Window.
Note: If you are invited by the User Account Control request, click Yes Grant admin access.
- Once you’re finally inside system professionalpIn the Erties window, click Progressive tab, then click environment variables (under Startup and recovery).
- once inside system variables window go system variables, so choose path and click To edit.
- Then, when you are in the Edit Environment Variable window, look for an environment variable that mentions Java.
- Once you find the culprit, click on it once to select it, then click Extinguish get rid of.
- Once the problematic environment variable has been removed, restart your PC, then restart Minecraft and see if the “A JNI error has occurred, please check your installation and try again.” The problem is now fixed.
Show more posts in this category: Computers & Electronics