При запуске какого-либо кода, написанного на Java, программист может получить сообщение об ошибке с текстом «A JNI error has occurred, please check your installation and try again». Обычно причиной ошибки выступает разница в версии компилятора и среды выполнения, из-за чего происходит некорректная интерпретация и выполнение имеющегося кода. Ниже разберём, в чём суть данной ошибки, как её исправить, а также отдельно укажем, как решить данную ошибку при запуске игры Minecraft.
- Что такое JVM, JNI и JRE?
- Причина проблемы A JNI error has occurred, please check your installation and try again
- Установите одинаковую версию JRE и JDK
- Правильно настройте переменные среды для Java
- Ошибка JNI error has occurred при запуске Майнкрафт
- Заключение
Что такое JVM, JNI и JRE?
Как известно, программы, написанные на «Java», компилируются в байтовый код, который распознаётся виртуальной машиной Ява, называемой «JVM» (Java Virtual Machine). JVM по своей сути является компьютерным симулятором, и при запуске программы написанной на Java, распознаёт инструкции байтового кода, и переводит их в машинные инструкции собственной системы.
JVM должна обеспечивать удобный способ доступа к ресурсам системы – файлам, сетевым соединениям, видеокарте и другим компонентам. Механизмы доступа к этим ресурсам напрямую зависят от системы, в которой работает JVM. Для обеспечения своей работы виртуальная машина использует собственный интерфейс Java, называемый «JNI» (Java Native Interface).
Методы Java, использующие JNI для доступа к службам, квалифицируются термином «native». Квалификатор «native» сообщает виртуальной машине, что код для выполнения при вызове данного метода присутствует во внешней библиотеке. JVM ищет конкретный вызов библиотеки, который необходимо выполнить, на основе полного имени пути к методу и его аргументам. Существует специальное соглашение об именах, позволяющее сопоставить метод с конкретной ссылкой на внешнюю библиотеку.
Данный механизм JNI позволяет программам на Java кодировать имя переносимого метода. И скомпилированный в Виндовс код Java будет отлично запускаться на компьютерах под управлением Линукс или Мак.
Как мы уже писали выше, Java имеет собственные библиотеки для обеспечения базового взаимодействия с системой на уровне чтения-записи файлов, создания сетевых подключений и вывода изображения на экран. Они распространяются с JVM как часть среды выполнения Ява, известные как «JRE» (Java Runtime Environment), независимо от того, является ли она автономной JRE или включена в Java Development Kit (JDK).
Причина проблемы A JNI error has occurred, please check your installation and try again
Текст данной ошибки переводится как «Произошла ошибки INI, пожалуйста, проверьте вашу инсталляцию и попробуйте вновь». Данная ошибка, получаемая при запуске программы на JVM, указывает на проблему с запуском кода, связанного с собственным методом.
Причины проблемы могут быть следующими:
- Повреждена библиотека JDK / JRE, вследствие чего она не может быть загружена, и JVM не сможет выполнить код;
- Повреждён функционал операционной системы, вследствие чего последняя не в состоянии удовлетворить системный вызов, созданный нативным кодом;
- Имеются различия в номерах версий JRE (среда выполнения Java) и JDK (Java Development Kit), что также может вызывать ошибку JNI. Различия в номерах версий приведут к тому, что JVM откажется запускать код, потому что он был скомпилирован для совместимости с версией Java, превышающей максимальную версию, поддерживаемую JVM. Проще говоря, код может быть скомпилирован на одной версии Ява (например, 10), а пытается запускаться с помощью версии Ява 9;
- Также проблема может быть вызвана при попытке запустить файл.jar через командную строку, например с помощью команды java -jar File.jar.
Давайте разберём способы, позволяющие устранить ошибку JNI на вашем ПК.
Это может помочь: ошибка Out of memory — как устранить.
Установите одинаковую версию JRE и JDK
Исправить ошибку «A JNI error has occurred» поможет обновление JRE и JDK до актуальных синхронных версий. Необходимо убедится в их одинаковой версии, для чего вызовите системную строку (нажмите Win+R, введите там cmd и нажмите ввод), и наберите там:
java -version
и нажмите ввод.
Затем наберите: javac –version
Полученные результаты должны совпадать. Если они они не совпадают, то это сигнализирует о несоответствии версии компилятора и среды выполнения Java. Для решения проблемы рекомендуем установить однотипные и актуальные версии компилятора и среды выполнения, после чего вновь используйте команды «java -version» и «javac -version» для проверки, возвращают ли данные команды один и тот же номер версии.
Если версии синхронны, тогда ваш код Java необходимо будет скомпилировать с помощью компилятора новой версии. После этого ошибка «A JNI error has occurred, please check your installation» может быть устранена.
Правильно настройте переменные среды для Java
Для исправления ошибки «A JNI error has occurred» может понадобится настроить переменные среды для Java. Выполните следующее:
- Нажмите на Win+R;
- В открывшемся окошке введите sysdm.cpl и нажмите на ввод;
- Откроется окно свойств системы. Выберите вкладку «Дополнительно»;
- Далее внизу кликните на кнопку «Переменные среды»;
- В нижнем окне выберите переменную «Path», после чего нажмите чуть ниже на кнопку «Изменить»;
Выберите «Path», и нажмите на «Изменить» - Здесь вы ищите строку, в которой прописан путь установки вашего JDK. Например, он может хранится по пути C:ProgramFilesJavajdk-13.0.1bin;
- Если этой записи в перечне ваших переменных нет, вы можете добавить её, нажав на «Создать» справа. Если же вы еще не установили JDK, вы можете скачать её с https://www.oracle.com/java/technologies/downloads/;
- Когда вы найдёте данную строку, используйте кнопку «Вверх» пока запись не окажется в самой верхней части;
- Нажмите внизу на «Ок» для сохранения результата, и перезагрузите ваш ПК. Ошибка «JNI error has occurred» будет исправлена.
Смотрите на данном англоязычном виде способ решения возникшей проблемы:
Ошибка JNI error has occurred при запуске Майнкрафт
Некоторые пользователи, установившие обновление Minecraft 1.17 («Caves and Cliffs: Part 1»), сообщают, что получают сообщение об ошибке «A JNI error has occurred, please check your installation and try again» или «Java exception».
Если вы один из таких пользователей, тогда вам нет повода для беспокойства. «Ошибка JNI», которая начала появляться с последним обновлением Minecraft 1.17, может быть исправлена путем установки Java 16 или более поздних версий для своей работы. Это подтверждается многими сообщениями от игроков, у которых возникла рассматриваемая в статье проблема.
Читайте также: GLFW error 65542: WGL the driver does not appear to support OpenGL – как решить?
Заключение
В нашем материале была рассмотрена суть ошибки «A JNI error has occurred, please check your installation and try again», и перечислены способы для её решения. Обычно причиной ошибки является несоответствие версии JRE и JDK, которые приводят к появлению рассматриваемой ошибки. Рекомендуем обновить версию данных инструментов до самой синхронной и актуальной, после чего декомпилировать ваш код. Обычно после этого ошибка будет устранена, и вы сможете использовать рабочую версию вашего кода для необходимых вам задач.
10,895
views ❘
July 20, 2022
Some Minecraft users see the JNI error Minecraft server message that appears when trying to start the client or server: “A JNI error has occurred, please check your installation and try again“. This issue mainly occurs in Minecraft version 21w19a and newer.
Why does this “a JNI error has occurred” error occur? Here are possible reasons:
- The version of Java is old: Previous versions of Minecraft came with server software that was compatible with older versions of Java. However, this is not the case with the latest Minecraft update, which now requires Java to get up and running properly.
- The corrupted system path for Java: The system variable path for Java is corrupted and tricks the Minecraft launcher into thinking that Java is not actually installed on your PC.
Whatever the cause of this problem, the solutions below will help you fix it in no time.
Solution 1: Install the Latest Java Version
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.
You can complete the installation of Java’s latest version of Minecraft by following these steps:
Tip: Make sure the Minecraft launcher (Tlauncher or any other) is completely closed.
Step 1: Go to the official website to download the latest version of Java. Here you need to download the installation package you need correctly. For Windows users, they may choose to download the file ending with .exe.
Step 2: After downloading Java, install the software on your computer. You just double-click the downloaded executable and allow the installer to make changes when asked.
Step 3: Follow the on-screen instructions to finish the installation.
After that, you can check if the “a JNI error has occurred” error still appears.
Solution 2: Remove Broken System Path Variables for Java
If the first method doesn’t work, then this “a JNI error has occurred Minecraft” error is due to a corrupted system path variable for Java.
In this case, you can fix the problem by visiting the System Properties screen and modifying the environment variables in a way that removes the Java environment variables.
To do so, here is the guide:
- Step 1: Press the Win + R key to open the Run dialog box. Then type sysdm.cpl in it and press Enter.
- Step 2; In the System Properties window, switch to the Advanced tab, and then click on the Environment Variables button.
- Step 3: Once enter the System Variables window, under the System variables section, select Path and click on the Edit button.
- Step 4: In the next window, find the environment variables for Java. Then click it and click Delete.
After removing the offending environment variable, restart your PC, then start Minecraft again and see if the “a JNI error has occurred ” issue is fixed.
Tags:
-
Partition Wizard
-
Partition Manager
- How to Fix A JNI Error Has Occurred in Minecraft [A Full Guide]
By Vega | Follow |
Last Updated January 05, 2023
Some Minecraft users see the “a JNI error has occurred” error when trying to start the client (game) or server (.jar). If you also encounter this issue, then you can refer to the solutions provided in this article from MiniTool Partition Wizard.
Some Minecraft users see the JNI error Minecraft server message that appears when trying to start the client or server: «A JNI error has occurred, please check your installation and try again». This issue mainly occurs in Minecraft version 21w19a and newer.
Why does this “a JNI error has occurred” error occur? Here are possible reasons:
- The version of Java is old: Previous versions of Minecraft came with server software that was compatible with older versions of Java. However, this is not the case with the latest Minecraft update, which now requires Java to get up and running properly.
- The corrupted system path for Java: The system variable path for Java is corrupted and tricks the Minecraft launcher into thinking that Java is not actually installed on your PC.
Whatever the cause of this problem, the solutions below will help you fix it in no time.
Solution 1: Install the Latest Java Version
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.
You can complete the installation of Java’s latest version of Minecraft by following these steps:
Tip: Make sure the Minecraft launcher (Tlauncher or any other) is completely closed.
Step 1: Go to the official website to download the latest version of Java. Here you need to download the installation package you need correctly. For Windows users, they may choose to download the file ending with .exe.
Step 2: After downloading Java, install the software on your computer. You just double-click the downloaded executable and allow the installer to make changes when asked.
Step 3: Follow the on-screen instructions to finish the installation.
After that, you can check if the “a JNI error has occurred” error still appears.
Solution 2: Remove Broken System Path Variables for Java
If the first method doesn’t work, then this “a JNI error has occurred Minecraft” error is due to a corrupted system path variable for Java.
In this case, you can fix the problem by visiting the System Properties screen and modifying the environment variables in a way that removes the Java environment variables.
To do so, here is the guide:
Step 1: Press the Win + R key to open the Run dialog box. Then type sysdm.cpl in it and press Enter.
Step 2; In the System Properties window, switch to the Advanced tab, and then click on the Environment Variables button.
Step 3: Once enter the System Variables window, under the System variables section, select Path and click on the Edit button.
Step 4: In the next window, find the environment variables for Java. Then click it and click Delete.
After removing the offending environment variable, restart your PC, then start Minecraft again and see if the «a JNI error has occurred » issue is fixed.
Bottom Line
Two ways for fixing Minecraft server a JNI error has occurred issue. If you have any doubts about this article or have a better way to this problem, you can share it in the comment zone.
About The Author
Position: Columnist
Vega joined MiniTool as an editor after graduation. She enjoys helping people with computer problems, including disk management, data recovery, and more. She is constantly expanding her knowledge in related fields. And she will continue to bring more easy-to-understand professional articles to help people solve various problems on the PC.
In her daily life, Vega enjoys hanging out with friends, shopping online and listening to music. She is someone who knows how to enjoy life.
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.
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:
- Ensure that the Minecraft launcher (Tlauncher or any other) is completely closed before moving to the next step below.
- Open your default browser and visit the download page of the Java 15 Development kit.
- 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.
Downloading the x65 compressed archive of the Java 16 JDK - 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.
- 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.
Unzip the Java JDK - 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.
- Next, use File Explorer (My Computer) to navigate to the following location and paste the JDK 16 folder that you previously copied:
C:Program FilesJava
- Wait until the copying operation is complete, then close the window and double-click on your Minecraft launcher once again (TLauncher or other).
- Once you’re inside the launcher, click on the settings icon, then click on Settings from the context menu.
Accessing the Settings menu of the Minecraft launcher - Inside the Settings menu, ensure that the Minecraft Settings is selected at the top, then click the Browse button associated with Java path.
- Next, use the browse window to navigate to the following location:
C:Program FilesJavajdk-16.0.2bin
- Once inside, make sure that javaw.exe is selected before clicking the Open button.
- Finally, click on the Save button to successfully save the java path in your Minecraft launcher.
- 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.
- 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.
Open up the System Properties window Note: If you are prompted by the User Account Control prompt, click Yes to grant admin access.
- Once you’re finally inside the System Properties window, click on the Advanced tab, then click on Environment variables (under Startup and Recovery).
Open up System Variables menu - Once you’re inside the System Variables window, go to System Variables, then choose Path and click on Edit.
Editing the path variable - Next, once you’re inside the Edit environment variable window, go ahead and look for an environment variable that mentions java.
- Once you spot the culprit, click on it once to select it, then click Delete to get rid of it.
Deleting the java environment variable - 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.
Kamil Anwar
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.
Minecraft Java is probably the best edition of Minecraft. It allows you to customize, add, and modify your game using Minecraft mods. However, the only caveat with the Java edition is that it is filled with a lot of bugs and errors. One of these is the JNI error. The following is the exact error message that users are seeing.
Error: A JNI error has occurred, please check your installation and try again.
In this post, we will talk about the same error and see what you can do to resolve it. So, if you see A JNI Error Has Occurred in Minecraft try the solutions mentioned here.
What is meant by JNI error?
JNI error indicates that the application can not run the code associated with the native method. It is usually caused when the JDK or JRE is missing or is unable to be loaded. This error occur in Minecraft Java Edition which is known for these kinds of issues. However, in Minecraft’s case, missing JDK or JRE is not the only reason, if the path variable is broken, or there is a third-party app that’s interfering with your game, then also, you can see the error code in question. If you want to resolve this issue check the solutions mentioned in this post.
To fix Minecraft Error A JNI error has occurred, please check your installation and try again on Windows 11/10 PC, follow these suggestions:
- Install the latest version of Java JDK
- Check Java Environmental Variable
- Troubleshoot in Clean Boot
- Remove the Older Version of Java
Let us talk about them in detail.
1] Install the latest version of Java JDK
Let us start by installing the latest version of Java JDK. This issue was reported by users who were trying to launch Minecraft or its server on systems with no Java (16 or above). So, let us start by installing the latest version of the tool on your system and see if it helps.
But before that, close Minecraft, open Task Manager, check if there are any related tasks running in the background, and close them as well.
Follow the prescribed steps to install the latest version of Java JDK at the right location.
- Go to Oracle.com and download a compressed archive file for any version of Java (16 or above) for Windows.
- After downloading the zip file, extract it and copy the extracted folder to the clipboard.
- Then, open File Explorer, go to the following location and paste the copied folder.
C:Program FilesJava
- Once you have pasted the folder, open the Minecraft launcher.
- Click on the Browse button associated with Java Path.
C:Program FilesJavajdk-<version-number>bin
Note: Instead of <version-number> write the number of the version you have downloaded. For example, if you have downloaded Java 16.02, write jdk-16.0.2.
- Add the exe file of Java.
- Finally, save the changes you have made.
Open the game and see if the issue persists.
2] Check Java Environmental Variable
Next up, we need to make sure that there is no broken Java Environmental Variable. To do the same, we are going to check the path variables in the settings and then make the required changes.
Follow the prescribed steps to do the same.
- Open Run, type sysdm.cpl and click Ok.
- Make sure that you are on the Advanced tab and click on Environmental Variable.
- From the System variables, select Path, and click on Edit.
- Look for the environmental variable of Java, select it and click on Delete.
Once the variable is deleted, restart your system and run Minecraft. Hopefully, this will do the job for you.
3] Troubleshoot in Clean Boot
You may also see the error code in question if there is a third-party app interfering with Minecraft. In that case, we need to perform Clean Boot and manually disable processes one at a time. This way, you will be able to find the culprit. Once you know the troublemaker, just remove it and your issue will be resolved.
Bonus Tip: Since we will now have the latest version of Java, there is no point in keeping its older version. So, you should uninstall old Java versions to save some valuable space.
Hopefully, these solutions will do the job for you.
Read: Fix Minecraft game has crashed with Exit Code 0
How do I fix Java errors in Minecraft?
There are a lot of Java errors in Minecraft. If you see a JNI error, you can try the solutions mentioned in this post. If you see Internal Exception Java.IO.IOException then check our guide on how to fix the error. Hopefully, you will be able to resolve the issue with the solutions mentioned in that guide.
Also Read: Java Virtual Machine Launcher, Could not create the Java Virtual Machine.
Outdated Java version could cause this error
by Henderson Jayden Harper
Passionate about technology, Crypto, software, Windows, and everything computer-related, he spends most of his time developing new skills and learning more about the tech world. He also enjoys… read more
Published on December 4, 2022
Reviewed by
Alex Serban
After moving away from the corporate work-style, Alex has found rewards in a lifestyle of constant analysis, team coordination and pestering his colleagues. Holding an MCSA Windows Server… read more
- A JNI error in Minecraft can occur if the Java version on your system is outdated.
- Resetting the Java path on your PC can fix the error with the Java runtime environment.
- Deleting old versions of Java from your computer will force Minecraft to use the latest version.
XINSTALL BY CLICKING THE DOWNLOAD FILE
This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues and remove viruses now in 3 easy steps:
- Download Restoro PC Repair Tool that comes with Patented Technologies (patent available here).
- Click Start Scan to find Windows issues that could be causing PC problems.
- Click Repair All to fix issues affecting your computer’s security and performance
- Restoro has been downloaded by 0 readers this month.
There are a couple of errors users can encounter with the Minecraft client. Recently, users report the -error: a JNI error has occurred, please check your installation and try again when starting the game client or server (.jar) on their computers.
Hence, knowing how to fix Java Virtual Machine launcher fatal exception errors will be beneficial.
Why do I get a JNI error in Minecraft?
Games like Minecraft depend on Java libraries to function on your PC. So, issues with the Java library will affect the game client. It can prompt Windows error 2 while loading the Java VM on the system.
Also, compatibility is a common cause of the problem. If you’re using a Minecraft server, mods, or a feature that is incompatible with the Java library, you will likely encounter this error.
Other factors that can cause the JNI error has occurred in Minecraft are:
- The corrupt system path for Java – The Minecraft JNI error can occur if the Java system variable path is compromised. It can cause conflicts between the client and Java on your PC, resulting in a JNI error in the Minecraft server. Also, a wrong Java installation path can cause errors in Minecraft.
- Outdated version of Java – Older versions of Java only support designated versions of clients. So, having an outdated version for your game client can cause errors. It means the Minecraft client is running on a Java version lower than it should be.
The above-listed causes may differ depending on the circumstances around the error. Nonetheless, you can fix the error by troubleshooting your PC.
How do I fix the error: JNI error has occurred issue?
Try the following preliminary checks:
- Create a System image backup on your PC.
- Restart Windows in Safe Mode and check if the error is resolved.
If the error persists, go on with the solutions below.
1. Install the Latest Java Version
- Go to Oracle’s official website, and download the installation package for your OS.
- Click on the downloaded file, double-click the .exe file, and allow the installer to make changes when prompted.
- Follow the onscreen installation instructions to install the latest Java.
- Restart your PC after the installation and check if the error persists.
Installing the latest version of Java will fix any compatibility errors that can cause the error between the game client and Java. You can read about downloading Java on Windows 11 for more guidance.
2. Reset Java Path
- Press Windows + R to open the Run dialog box, type sysdm.cpl, and press Enter to open the System properties.
- Navigate to the Advanced tab and click the Environment Variables button.
- On the System Variables page, select Path and click the Edit button.
- Find the Java variable paths files and delete them.
- Restart your PC afterwards and check if the JNI error persists.
Resetting the Java path will fix Java runtime environment errors that can cause the error.
- Games Keep Crashing in Windows 10: Fix in 8 Steps
- Fix: Error Code Deep Ocean on Minecraft [Error 0x80070057]
- 5 Ways to Fix High CPU Usage on Battlefield 4
- Minecraft Won’t Install on Windows 11: 5 Easy Methods to Use
- Minecraft Keeps Crashing Windows 10: Why & How to Fix
3. Uninstall Old Versions of Java
- Press Windows + R key to open the Run dialog window, type the control panel, and press Enter.
- Click on the View by option and select Category. Go to Programs and click on the Uninstall a Program link.
- Click on the older versions of Java and hit the Uninstall option.
- Close the Control Panel and restart your PC to check if the JNI error in Minecraft persists.
Some users still report not being able to fix the error after the two fixes above. So, uninstalling the old versions of Java on your PC will force Minecraft to use the latest version if it isn’t using it.
Alternatively, our readers can check ways to fix JAR files not opening on Windows 11. Also, you can read about fixing Java update/install not complete error 1603 on your PC.
If you have more questions or suggestions, do not hesitate to use the comments below.
Still having issues? Fix them with this tool:
SPONSORED
If the advices above haven’t solved your issue, your PC may experience deeper Windows problems. We recommend downloading this PC Repair tool (rated Great on TrustPilot.com) to easily address them. After installation, simply click the Start Scan button and then press on Repair All.
Newsletter
Question
Issue: [Solved] Minecraft 1.17 A JNI error has occurred – please check your installation and try again (TLauncher)
Hello. I tried to launch Minecraft, as usual, yesterday, and I received a strange error “A JNI error has occurred – please check your installation and try again.” This happens when I try to launch the 1.17 Minecraft versions via the TLauncher. Any ideas?
Solved Answer
Minecraft players finally got their hands on the newest version of the game, which was released on June 8, 2021. Under the name Caves & Cliffs, the update adds new mobs (goat, glow squid, and axolotl) and various new minable materials, such as copper ore.[1] The patch was released for the Java version of Minecraft.
While many users were eager to jump into the updated sandbox[2] world, others were greatly disappointed, as they were unable to due to an unexpected error “A JNI error has occurred, please check your installation and try again,” which also commonly followed with “A Java Exception has occurred.” This started happening in Minecraft version 1.17.
According to many user reports, the error happens after trying to start the game via the TLauncher. It is rather strange since the message points to the faulty or missing version of Java. In fact, many players who experienced the error claimed that they already have Java on their computers installed.
According to tech reports, the problem lies within the Java version, as Minecraft has been updated to use Java 16 with the latest patch. According to Mojang Studios, the creator of Minecraft, the error occurs when people try to launch the game or the server (.jar) without Java 16 in the 1.17 version of the game.
Thus, running the correct Java version should help you fix “A JNI error has occurred – please check your installation and try again” in Minecraft. We also provide several alternative methods if the first one does not work.
Since most people use the Java version of the game, users managed to run into problems before. Previously, we talked about GLFW Error 65542, “Multiplayer is disabled,” “io.netty.channel.ConnectTimeoutException connection timed out,” and many other issues that cause various problems with Minecraft.
If you keep running into issues when playing games or using any other features on your Windows 10 computer, we strongly recommend you first run a scan with a PC repair tool ReimageMac Washing Machine X9, as it can automatically detect and remove problems related to BSODs,[3] DLL errors, registry problems, and much more.
Solution 1. Download and install the latest version of Java correctly
Fix it now!
Fix it now!
To repair damaged system, you have to purchase the licensed version of Reimage Reimage.
Solution 2. Add command line to JVM arguments within the TLauncher
Fix it now!
Fix it now!
To repair damaged system, you have to purchase the licensed version of Reimage Reimage.
Unfortunately, some users said that updating Java in this way caused them to receive one or both of the following errors:
- ERROR: could not create the java virtual machine
- ERROR: A fatal exception has occurred. Program will exit.
If that is the case for you, follow these steps:
- Open TLauncher
- Click the cogwheel at the bottom-right corner of the window and select Settings
- In Minecraft Settings tab, find the JVM arguments section
- Delete any contents if such are available
- Copy and paste the following:
-XX:+IgnoreUnrecognizedVMOptions - Click Save and attempt launching the game.
Solution 3. Check your antivirus
Fix it now!
Fix it now!
To repair damaged system, you have to purchase the licensed version of Reimage Reimage.
It is not a secret that third-party antivirus programs might not be very well compatible with other programs. It is known that they have been causing users to download and install the latest Windows updates or run certain programs. Thus, if you are sure that you have the latest Java version installed and keep receiving the “A JNI error has occurred, please check your installation and try again” error, try uninstalling your security software, and launching the game.
Solution 4. Update GPU drivers
Fix it now!
Fix it now!
To repair damaged system, you have to purchase the licensed version of Reimage Reimage.
GPU drivers are extremely important to anybody who is playing games. Thus, you should make sure that you have all your graphics card drivers updated:
- Right-click on Start and pick Device Manager
- Expand Display adapters section
- Right-click on your video card name and select Update driver
- Pick Search automatically for drivers
- Wait till all the files are installed and then reboot your system.
It is important to note that Device Manager is not quite sufficient when it comes to driver updates, especially when we are talking about GPU drivers. It might often fail to find the relevant updates and skip them entirely. Thus, you are better off downloading the driver from your GPU’s manufacturer’s website or by employing an automatic driver updater such as DriverFix.
Repair your Errors automatically
ugetfix.com team is trying to do its best to help users find the best solutions for eliminating their errors. If you don’t want to struggle with manual repair techniques, please use the automatic software. All recommended products have been tested and approved by our professionals. Tools that you can use to fix your error are listed bellow:
do it now!
Download Fix
Happiness
Guarantee
do it now!
Download Fix
Happiness
Guarantee
Compatible with Microsoft Windows
Compatible with OS X
Still having problems?
If you failed to fix your error using Reimage, reach our support team for help. Please, let us know all details that you think we should know about your problem.
Reimage — a patented specialized Windows repair program. It will diagnose your damaged PC. It will scan all System Files, DLLs and Registry Keys that have been damaged by security threats.Reimage — a patented specialized Mac OS X repair program. It will diagnose your damaged computer. It will scan all System Files and Registry Keys that have been damaged by security threats.
This patented repair process uses a database of 25 million components that can replace any damaged or missing file on user’s computer.
To repair damaged system, you have to purchase the licensed version of Reimage malware removal tool.
To stay completely anonymous and prevent the ISP and the government from spying on you, you should employ Private Internet Access VPN. It will allow you to connect to the internet while being completely anonymous by encrypting all information, prevent trackers, ads, as well as malicious content. Most importantly, you will stop the illegal surveillance activities that NSA and other governmental institutions are performing behind your back.
Unforeseen circumstances can happen at any time while using the computer: it can turn off due to a power cut, a Blue Screen of Death (BSoD) can occur, or random Windows updates can the machine when you went away for a few minutes. As a result, your schoolwork, important documents, and other data might be lost. To recover lost files, you can use Data Recovery Pro – it searches through copies of files that are still available on your hard drive and retrieves them quickly.
You have encountered this JNI Error error message? Don’t panic! The problem can usually be solved quite quickly – and here you can find out how.
Have you encountered this error message or popup?
Error: A JNI error has occurred, please check your installation and try again
The problem comes from the fact that your JRE (Java Runtime Enviroment), that is your installed Java version and your JDK (Java Development Kit) do not work together correctly.
Now there are several possible solutions for you. Just choose the scenario that applies to you:
JNI Error in Windows CMD
JNI Error when starting a Minecraft Server
JNI Error in Minecraft TLauncher
JNI Error in Windows CMD
The problem can occur if you want to call a .jar file via command line (Windows CMD), e.g. via the command java -jar File.jar
or if you have compiled your program with Eclipse before.
To fix the error, you need to adjust the environment variables for Java.
- To do this, type “environment variable” in your Windows search and open the “Edit System Environment Variables” item. In this window you click on “Environment variables…”.
- The “Environment variables” window opens. There you select the variable “Path” in the lower window “System variables” and click on “Edit…”.
- There you look for the line where the installation path of your Java JDK is stored. In my case this is under C:Program FilesJavajdk-13.0.1bin.
If you don’t have a Java JDK installed yet, you can download and install the .exe installation file (“x64 Installer”) here.
- If you do not have this entry, you can add it by clicking the “New” button.
- Select the line with the Java JDK and click on “Move up” until the entry is at the top. Done!
- Now you have to close and reopen the Windows-CMD once and the error should be fixed.
JNI Error when starting a Minecraft Server
If you try to start your Minecraft server via the official server.jar (error occurs since version 1.17), you may get this error message:
- Download the latest Java JDK version as .exe file (“x64 Installer”) and install by clicking on the .jar file
- Now the server should start again
JNI Error in Minecraft TLauncher
This error message can also appear when launching the Minecraft TLauncher.
- Download the latest Java JDK version as .zip archive (“x64 Compressed Archive”) (see screenshot)
- Right-click on the downloaded file and click “Extract here”.
- Copy the unzipped folder to the directory C:Program FilesJava
- Launch your Minecraft TLauncher and click on the gear in the bottom right corner
- Click at “Java path” on “Browse…” and choose C:Program FilesJavajdkXbinjavaw.exe (replace the X by the name of your JDK folder).
- Save everything – now the game should start again
Java JNI error message still appears?
- Restart your computer
- Uninstall old Java versions under Control Panel > Programs > Programs and Features and install the latest Java JRE and Java SDK.
I hope that you were able to fix the JNI error with the help of this post. If this is still not the case, feel free to write me a comment.
What did you think of this post?
Related Posts
This can also interest you