Bfsoft.ru

Программы, сервисы, полезные советы о компьютере и интернете
3 просмотров
Рейтинг статьи
1 звезда2 звезды3 звезды4 звезды5 звезд
Загрузка...

A JNI error has occurred, please check your installation and try again — как исправить?

A JNI error has occurred, please check your installation and try again in Eclipse x86 Windows 8.1

The above code works perfectly on my friend’s laptop and throws this error on my laptop. I have running the code on Eclipse Juno using Java 7. I have also tested and run a lot java programs on my laptop all works well. This is the only program which gives such an error. This is my final year project and I need it to work on my laptop, I will be greatful to anyone who helps

39 Answers 39

I have been having this problem for a while, but now I have figured it out.

It turns out that Java JDK 12 have both the JRE and the JDK inside the bin folder of the Java 12 JDK. (I have always believed that JRE and JDK are different application, but it turns out things have changed)

My problem was that I had Java JDK 12 installed on my computer

At the same time, I had Java 8 (JRE) Installed on my computer.

So my computer is getting confused.

With my command prompt environment setup to run Java and Javac commands:

I typed the follow commands:

// this gave me Java 8

After that, I typed:

// this gave me Java 12

In other words, my program is getting compiled with Java 12 and I am trying to run with Java 8.

To solve the problem, I uninstalled Java 8 JRE from my computer.

Went back to command prompt to check if «java -version» and «javac -version» is returning the same version number, and yes, it is returning Java 12.

Tried recompiling my program again, and running it. It Worked!!

It worked! Eureka!!

Short answer: Right-click on the class that contains the main method. Click on «Run As». Click on «Java Application». The keyboard shortcut is: Shift+Alt+X J (while holding Shift and Alt, press X; then release Shift and Alt and press J).

Long answer: To be honest, I am not 100% sure why this problem happens. It might be because of using a different jdk. I faced the same error. The solution was easier than I imagined. I was used to running my code using Ctrl + F11. But when I ran it as a java application (the way I described in «short answer»), the problem was resolved. I am not sure if it solves other people’s problems as well, but it is worthwhile to try. 🙂

Running the jar from command line by:

I got information which made the problem clearer:

main/Main has been compiled by a more recent version of the Java Runtime

enter image description here

In this case jar was compiled with version newer than jre supports.

Error: A JNI error has occurred, please check your installation and try again in Eclipse

Solution: Check your package name as it may be colliding with the package name in java. Simply change the package name to resolve your issue. 🙂

I had similar issues when using ‘java’ at the beginning of the package name, e.g. java.jem.pc

Check your console output, I was receiving:

In my case the issue was caused by the JDK version. To solve this I suggest to go into your pom file and check the <jdk.version>1.7</jdk.version>.

Afterwards check java version in your cmd(windows) or terminal ( OSX or LINUX ) by typing : java -version.

Compare the version shown in the terminalcommand prompt with what you have in your pom file. Make sure they are the same. Then run your project again.

Hi I faced similar problem with a project, in IntelliJ with Maven dependencies.

I solved it changing the dependencies scope from provided to compile.

IntelliJ:

File > project structure > Modules > Dependencies > scope (provide to compile)

I solved it changing my ‘Compiler compliance level’. In Eclipse:

Window -> Preferences -> Java -> Compiler

You can check the console first to see the actual error message then proceed by looking for answers for that error.

My console shows the error NoClassDefFound for the class jcommander. Your error will probably be different from mine. The cause of my error is that the class jcommander is not in my M2 repository, so I just have to add that dependency in my pom.xml. You can check if all the class dependencies are all declared and added in your current config and project build.

I also faced the same issue. By looking at the console that’s saying

the Solution is:

Check your package name of your project.

Hope your issue will be resolved. If not, then please print your console trace for tracking the root cause.

It can happen if the JDK version is different.

try this with maven:

I have found that adding these lines of code to the pom.xml file of the maven project solves similar issues for me:-

I was facing the same issue and in my case compiler compliance level was selected as 14 in my eclipse settings. In order to fix it, I changed it to the version of JDK on my machine i.e 1.8 and recompiled the project.

enter image description here

Check your console. It says java.lang.SecurityException issue. Change your ‘package name’. I changed my package name from ‘java.assessment’ to ‘assesment’ and it worked for me. If somebody knows the root cause , let me know please.

Читайте так же:
Как определить породу собаки по фото

POSSIBLE SOLUTION If NONE of these solutions worked for you then try this. I finally got mine working by deleting the two folders «.metadata» & «.recommenders» in the workspace folder. You can find your workspace folder path by clicking on «File»>»Switch Workspace»>»Other» in the Eclipse application’s toolbar.

Now I am a complete noob crying my way through an SE degree at San Jose State University. So I am just sharing what worked for me without knowing much knowledge of why exactly. I do not know what harm or headaches, or even if both aforementioned folders needed to be deleted. But in the end, it worked for me and it seems the application just recreates fresh versions of those folders anyways.

I experienced the same issue, however in my case it was due to the Configuration settings in IntelliJ IDEA.

Even though the project SDK (File -> Project Structure) was set to Java 11, the JRE in the Run/Debug Configurations (Run -> Edit Configurations) was set to Java 8. After changing that to Java 11, it worked like a charm.

I faced a similar problem and than got the solution in the package name. I kept the package name as java.basics. In the console I got a hint for that as it clearly said Prohibited package name. So I changed package name and it worked.

edit the «.classpath» and include below tag

<classpathentry kind=»con» path=»org.testng.TESTNG_CONTAINER»/>

this could solve your problem.

I hope this helps somebody else. I was suffering with this while working on a project a few years ago and then a job in a newer project started failing a few days ago. I found this post and was trying to recollect what I had modified in my project and then I remembered that I had changed my maven pom and removed the entry for maven-jar-plugin. When you build a jar whose purpose is to be executable, you need to include this so that certain entries get written into the manifest. I opened the old project, copied that entry (with some modifications for project name) and it worked.

I think this happen because the name of your class is the same name of another class in the JDK . Help eclipse to determine which one you are trying to run by selecting the package your class is in . Go to run configuration select the project and the main class.

When you press the search button to select the main class, you will find options that have the same name but different package, select your class.

There was no information in my Console so that sent me searching for additional solutions and found these — unique to the solutions presented here. I encountered this with Eclipse Oxygen trying to run an old Ant build on a project.

Cause 1 I had configured Eclipse to use an external Ant install which was version 1.10.2 which apparently had classes in it that were compiled with JDK 9. In Eclipse I got the JNI error described above (running the Ant build at the command line gave me the reknowned ‘unsupported major.minor version’ error — the Java I was using on the system was JDK 8).

The solution was to rollback to the embedded Eclipse version of Ant being 1.10.1. I verified this as the correct solution by downloading Ant 1.10.1 separately and reconfiguring Eclipse to use the new 1.10.1 externally and it still worked.

Cause 2 This can also happen when you have the Ant Runtime settings configured incorrectly in Eclipse’s Preferences. Depending on the version of Ant you’re running you will need to add the tools.jar from the appropriate JDK to the classpath used for the Ant Runtime (Home Entries). More specifically, without a proper configuration, Eclipse will complain when launching an Ant target that the JRE version is less than a particular required version.

Essentially, ‘proper configuration’ means aligning each of the configuration items in Eclipse for running Ant so that they all work together. This involves the Ant Runtime Home entry (must point to an Ant version that is compatible with your chosen JDK — you can’t run Ant with JDK 8 when it was compiled against JDK 9); specifying the tools.jar that belongs to the JDK you want to run Ant with in the Ant Runtime settings; and lastly setting the JRE environment of your build script to the JDK you want to run Ant with in the External Tools Configuration. All 3 of these settings need to agree to avoid the error described above. You’ll also need to consider the attributes used in your javac tag to ensure the JDK you’re using is capable of executing as you’ve directed (i.e. JDK 7 can’t compile code using source and target version 8).

Moreover If you’re really just trying to run an Ant build script to compile code to an older JDK (e.g. less than 8 for Oxygen), this article helped gain access to run Ant against an older JDK. There are Ant plugin replacements for a handful of versions of Eclipse, the instructions are brief and getting the correct plugin version for your particular Eclipse is important.

Or more simply you can use this very good solution to do your legacy compile which doesn’t require replacing your Eclipse plugin but instead changing the javac tag in your build script (while using the latest JDK).

Читайте так же:
Что значит Флексить? Как научиться правильно флексить руками и ногами

Fix: ‘A JNI Error Has Occurred’ in Minecraft

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.

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.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. 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:
  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. 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:
  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.

    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

Решение проблем в TLauncher

Решение проблем в TLauncher

Если у вас появились вопросы при использовании нашего TLauncher, то в этой новости мы собрали наиболее частые проблемы и их решения.


— А это платно?
Нет, это бесплатно.

— Что делать, если TLauncher или Minecraft отказывается работать?
1) Переустановить Java с сайта http://java.com
2) Скачать последнюю версию TLauncher:
3) Удалить файл настройки

/.tlauncher/ru-minecraft.properties
4) Удалить папку

/.minecraft/ (см. пункт 5)
5) Пути к нужным папкам:
— В Windows: . %Папка пользователя%AppDataRoaming
— В Linux: /home/%Имя пользователя%/
— В MacOS: /home/%Имя пользователя%/Library/Application Support/
(!) Если у Вас есть важные файлы в папке Minecraft, сделайте их резервную копию.

— Не запускается игра, в консоли последние строки:
Error occurred during initialization of VM
Could not reserve enough space for 1048576KB object heap
Java HotSpot (TM) Client VM warning: using incremental CMS
[. ]

Ошибка связана с выделением оперативной памяти лаунчеру. Для решения, нажимаем «Настройки» -> «Дополнительно», находим надпись «Выделением памяти», пробуем изменять значения до тех пор, пока игра не запустится, конечно после каждого изменения сохраняя и пробуя запускать.

Выделение памяти в лаучнере

* на скриншоте количество выделяемой памяти стоит для примера, у вас может запуститься только на других значениях.

— Что делать, если TLauncher не запускается?
1) Скачайте лаунчер заново, так как это может быть связано с ошибкой при скачивании/обновлении исполняемого файла.
2) Переместите исполняемый файл TLauncher в папку, в пути которой нет спец. символов (!, ?, @. ) и символов, которых не поддерживает стандарт ASCII (то бишь кириллицы, иероглифов и других не латинских букв).
3) Удалите Java и скачайте более новую версию. Если таковой нет, просто переустановите имеющуюся.

— Как установить 32-битную / 64-битную Java на Windows?
1) Откройте страницу загрузки:
Java 7: ТУТ .
Java 8: ТУТ .
2) Жмакните «Accept License Agreement»
3) Выберите и скачайте нужную версию
Для Java 7: Windows xAA jre-7uNN-windows-xAA.exe
Для Java 8: Windows xAA jre-8uNN-windows-xAA.exe
. где AA – разрядность (32 или 64, выберите нужный), NN – номер апдейта (чем больше, тем лучше и новее).
4) Установите как обычную программу.
5) Готово!

— Как установить скин?
Купить игру и установить в профиле на официальном сайте.

— Почему мой скин отображается криво?
Начиная с версии 1.8 используется другой формат скинов, который не поддерживается в более ранних версиях.

— Почему мой скин — баба Алекс?
Скин вычисляется по идентификатору вашего ника. Тип скина может быть сменён только из личного кабинета на Minecraft.net , то есть для этого нужно купить игру.

— Я поставил скин по нику, почему он не отображается?
С введением новой системы скинов (с версий 1.7.5+), скин перестал отображаться у пиратов.

— Где взять моды?
У нас на сайте, в разделе Моды.

— Как установить моды?
Читайте инструкцию в новости с модом.

— Где папка «bin», файл «minecraft.jar»?
После выхода Minecraft 1.6 (которая вышла больше года назад, слоупоки) папка «bin» заменена на папку «versions/Номер_версии/», а «minecraft.jar» на «versions/Номер_версии/Номер_версии.jar» соответственно.

— Версии с Forge (до 1.7.10) не запускаются вообще. Или при их запуске лаунчер перезапускается (закрывается и снова открывается).
Возможно, у тебя установлен один из апдейтов Java 8, который имеет известный баг сортировщика.

Патчинг Forge
1) Скачай один из перечисленных файлов:
– Для Forge 1.6.4 #965: ТУТ .
– Для Forge 1.7.2 #1121 / #1147: ТУТ .
– Для Forge 1.7.10 #1208: ТУТ .

(!) Для новых версий Forge 1.7.10 патч не требуется.
2) Открой папку Minecraft, кликнув на иконку папки в главном меню TLauncher.
3) Последовательно перейди в папку libraries/net/minecraftforge/minecraftforge/
4) Найди папку, окончание имени которого совпадает с номером патча.
Например, ты скачал патч для Forge 1.7.2 #1121 / #1147: тебе нужно открыть папку 1.7.2-10.12.2.1121 (или 1.7.2-10.12.2.1147, как там будет; если есть обе папки, применяй патч к обоим)
5) Открой JAR-файл, находящийся в этой папке любым архиватором. Удали папку META-INF/. Открой папку cpw/mods/fml/relauncher/ и скопируй в неё файл, который ты скачал. Согласись на замену и закрой архиватор.
6) Готово 🙂

Установка Java 7.
1) Удали Java 8:
– Панель управления -> Программы и компоненты -> Java 8 Update xx -> Удалить
2) Установи Java 7, если она не установлена:
– Перейди по этой ссылке: http://www.oracle.com/technetwork/java/javase/downloa..

– Нажмите «Accept License Agreement»
– Если у тебя 64-битная система, выбери «Windows x64 (jre-7uXX-windows-x64.exe)». Если нет, то выбери «Windows x86 Offline (jre-7uXX-windows-i586.exe)».
* На месте XX любое двузначное число от 51 до 99.
– Запусти загруженный файл

— Не могу играть на сервере!
1) Если выходит ошибка «связанная чем-то там с java», то попробуйте отключить антивирус и/или брандмауэр и проверьте подключение к Интернету.
2) Если выходит ошибка «Bad Login» или «Invalid session» («Недопустимая сессия»), то ошибка связана с тем, что сервер использует премиум-модель авторизации, то есть пиратов (или просто людей с другими лаунчерами), на этот сервер не пустят. Попробуйте войти на этот сервер с использованием лаунчера, который предлагается на сайте/странице этого сервера, либо используйте официальный.

Читайте так же:
Что значит «переслать» в статистике сторис в Инстаграм?

— Не могу играть по локальной сети: пишет «Недопустимая сессия»
«Открыть» сервер для сети могут только премиум-пользователи. Создайте отдельный сервер (У нас есть статья как создать сервер Майнкрафт) и в его настройках пропишите online-mode=false

— Антивирус avast! блокирует трафик TLauncher. Что делать?
Настройки -> Активная защита -> Веб-экран -> Сканировать трафик только через известные браузеры

— Антивирус Касперского блокирует загрузку ресурсов. Что делать?
Добавьте в белый список Анти-баннера адрес: http://resources.download.minecraft.net/ad/ad*

— Что делать при «Minecraft closed with exit code: -805306369»?
Лаунчер сам консультирует Вас по этому вопросу

У этой ошибки нет строго определённой причины.
Но мне известно, что она имеет место:
— Преимущественно на версиях >1.6.4
— При попытке сломать стекло
— После установки текстур-пака (с сервера)
— Техническая причина: из-за ошибки выделения памяти (PermGen, все дела).

Возможные решения:
— Нажмите галочку «Обновить клиент» и нажмите «Переустановить». Таким образом Вы даёте лаунчеру шанс обнаружить поврежденные файлы и скачать их заново.
— Удалите моды и ресурс-паки. Да, они тоже могут наложить свои лапы на сложившуюся ситуацию
— Можете отключить звук в настройках самого Minecraft. Вы будете играть без звука, зато без вылетов.

— Как установить Forge самостоятельно?
1. Перейдите на этот сайт: http://files.minecraftforge.net/

2. Найдите нужную версию Forge
3. Скачайте «Installer» выбранной версии
4. Запустите его, нажмите «OK»
5. .
6. Profit! Установленные таким образом версии Forge обычно находятся в конце списка версий.

— Как установить OptiFine самостоятельно?
1. Перейдите на этот сайт: http://optifine.net/downloads

2. Найдите нужную версию OptiFine и скачайте её. Рекомендуется редакция «Ultra»
3. Запустите файл, нажмите «Install»
4. .
5. Profit!

— Как установить LiteLoader самостоятельно?
1. Перейдите по этой ссылке: http://www.liteloader.com/download

2. Найдите нужную Вам версию и скачайте её
3. Запустите загруженный файл и выберите версию, на которую надо установить LiteLoader. Примечание: если Вы устанавливали Forge способом выше, то установщик автоматически найдет её. Таким образом, если Вы хотите совместить Forge и LiteLoader, то либо выберите Forge в списке версий, либо щёлкните по галочке «Chain to Minecraft Forge».

— Как установить ForgeOptiFine (и/или OptiForgeLiteLoader) самостоятельно?
1. Скачайте Forge, OptiFine и LiteLoader (при желании) нужных Вам версий (см. выше)
2. Установите и запустите Forge (обязательно), LiteLoader (при желании)
3. Положите OptiFine в папку mods/
4. .
5. Profit! При запуске Forge, OptiFine и LiteLoader (если есть) включат режим взаимной совместимости (или нет)

— Я обновил лаунчер, а у меня пропали все аккаунты/сохранения/сервера/плюшки. Что делать?
Начнём с того, что ничего не пропало. Обновился ТОЛЬКО лаунчер и ТОЛЬКО файл его конфигурации.
Скорее всего, ты поместил папку Minecraft не в стандартную директорию, а в какое-то другое место. Вспомни, где всё это дело лежало, и в настройках лаунчера в поле «Директория» укажи на него. Ничего трудного. Лаунчер снова начнёт работать по старому пути.


0) Прочитайте FAQ выше и попробуйте все варианты решения наиболее частых проблем. Если же не помогло, читаем дальше.

1) Запустите TLauncher.

1. Откройте настройки:
Решение проблем в TLauncher
2. Открой вкладку «Дополнительно».
Решение проблем в TLauncher
3. Перейдите во вкладку «Настройки TLauncher».
Решение проблем в TLauncher
4. Выбери общую консоль разработчика.
Решение проблем в TLauncher
5. Сохраните изменения.
Решение проблем в TLauncher
Результат:
Решение проблем в TLauncher
1. Кликните правой кнопкой мыши по содержимому консоли и выберите «Сохранить всё в файл. ».
Решение проблем в TLauncher
2. Выберите удобное место и сохраните файл там.
Решение проблем в TLauncher
3. Залейте файл как документ ВКонтакте или сохраните его на каком-либо файлообменном сервисе.
1. Нажмите на иконку скрепки в консоли.
Решение проблем в TLauncher
2. Подождите, пока данные отправляются.
Решение проблем в TLauncher
3. После успешной отправки появится сообщение. Нажмите «Да».
Решение проблем в TLauncher
4. Откроется браузер. Если попросит, введите капчу и нажми «Submit».
Решение проблем в TLauncher
5. Готово! Можно передавать ссылку на эту страницу тем, кто может помочь.
Решение проблем в TLauncher

[Updated] Minecraft ‘A JNI error has occurred, please check your installation and try again’ or ‘Java exception’ after 1.17 update? Here’s how to fix

[Updated] Minecraft

Minecraft players are finally getting their hands on the latest 1.17 Caves and Cliffs: Part 1 update that brings three new mobs — goats, glow squids, and axolotls amongst many other additions.

Of course, it’s a massive update that players have been looking forward to for weeks, and now that it’s here, players around the world are checking out the new update to see what it has to offer.

Unfortunately, it seems that the new update is off to a bumpy start. Some individuals who’ve installed Minecraft 1.17 are reporting that they’re getting an error message that says ‘A JNI error has occurred, please check your installation and try again’ or ‘Java exception’.

We’ve shared some reports from disgruntled users below for reference:

When i try to play 1.17-rc1 or snapshots it gives 2 errors. Error1: A JNI error has occored please check your installation and try again. Error2: A java exeption has occored (Source)

Does the server file work yet? I keep getting the error code: A JNI error has occurred, please check your installation and try again. (Source)

I have 1.17 Minecraft server files install but they’re giving me a JNI error, maybe its the launcher? (Source)

According to players, they aren’t able to install and play Minecraft 1.17 because they keep getting a ‘JNI error’ or ‘Java exception’ error.

Players have even confirmed that their computers do have Java installed but the error still pops up.

Читайте так же:
Как потратить бонусы Эльдорадо

Naturally, this has left many players scrambling to find a fix. In case you’re one of them, well, there’s no reason to fret.

The ‘JNI error’ that has started popping up with the latest Minecraft 1.17 update can be fixed by installing Java 16, as confirmed by many reports from players who were experiencing the problem.

Minecraft 1.17 requires Java 16 or later to work, hence the game does not work on computers that do not meet the requirements.

That said, in case you need a video guide to help fix the issue, we’ve shared one below.

Once you install Java 16 on your computer, you should be able to play the Minecraft 1.17 update without worrying about running into the ‘JNI error’.

Feel free to drop a comment letting us know whether or not this fixed the problem for you.

Update 1 (June 10)

Going by the bug page for “A JNI error has occurred, please check your installation and try again” at Mojang support, here’s something you need to know:

This error happens when you launch the client (the game) or server (the .jar) without Java 16 in 21w19 and above. Minecraft has was updated to use Java 16 as per the 21w19a changelog:

Minecraft now uses a more recent version of Java. If you are using a default setup the Launcher will download and install the correct version. If you are using a custom Java setup or a third-party launcher, you will need to ensure that your Java installation is version 16 or above.

And here’s how you can resolve the problem:

To fix this issue, download the AdoptOpenJDK and follow the steps below for the client or server.

Client: Make sure that your launcher is running Java 16. To do so, change the Java executable runtime to target “javaw.exe” in C:Program FilesJavajdk-16.0.1binjavaw.exe or where you installed Java 16. Contact your launcher maintainers if you cannot switch or do not know how to switch to Java 16.

Server: If you are running a server on your computer, make sure that AdoptOpenJDK is running the .jar. To make sure on Windows 10, the file properties should look like this:

Try uninstalling Java 8 and restart your computer to make sure you are running Java 16. If you are running a server with a host, contact the host.

If none if this works, please contact Community Support.

Update 2 (June 11)

Going by users reports, those of you facing the issue on Linux, here’s a tip for you:

FIX: FOR LINUX USERS ONLY!!

MAKE SURE TO UPDATE

sudo apt-get update

THEN

sudo apt search jdk

“find openjdk version 17” OR just do this command

sudo apt install openjdk-17-jdk

enjoy the new 1.17 update yall

In case, openjdk-17-jdk does not appear on entering “sudo apt search jdk” and on entering sudo apt install openjdk-17-jdk it says “Unable to locate package openjdk-17-jdk” you will be required to add another repository first. Here’s how a user puts it:

sudo add-apt-repository ppa:linuxuprising/java

sudo apt-get update

Optional: sudo apt search jdk

I found openjdk-16-jdk so I installed that; I didn’t see openjdk-17-jdk, but 16 works

sudo apt install openjdk-16-jdk

Update 3 (June 18)

An individual has highlighted some important information surrounding the availability of Java 16 on Mojang’s support website. Check out the information below:

Unlike Java 8, there’s no single provider of downloads for Java 16. Some major ones are:

– OpenJDK (from Oracle): https://jdk.java.net/16/
– Oracle: https://www.oracle.com/java/technologies/javase-jdk16-downloads.html
Oracle was historically the primary provider of Java, but their free downloads are now only intended for developers. Their standard releases are now paid and cost several hundred dollars per year. OpenJDK downloads are not included in this.

– Amazon Corretto (from Amazon): https://docs.aws.amazon.com/corretto/latest/corretto-16-ug/downloads-list.html
– Zulu (from Azul): https://www.azul.com/downloads/#download-openjdk
– AdoptOpenJDK (from Eclipse Foundation, sponsored by many organizations including Amazon, IBM, and Microsoft): https://adoptopenjdk.net/?variant=openjdk16&jvmVariant=hotspot
I would personally recommend AdoptOpenJDK, but the choice here is up to you.

Update 4 (July 16)

For those of you facing error or crash while loading the resource packs in the Java Edition, the official troubleshooting page suggests you to uninstall and re-install them. Following are the details:

If resource packs or mods fail to load or cause your game to crash, you will need to uninstall and reinstall them one at a time to find which one is the cause.

Tip: If you know the order in which you installed them, you can uninstall them in reverse order, testing after each uninstall.

Since resource packs and mods are not created by Mojang Studios, we do not offer support for them. If you need further assistance, contact the author of the mod or resource pack.

If this did not solve your issue, see Pink and Black Checkered Boxes Appear Where Textures Should Be.

PiunikaWeb started as purely an investigative tech journalism website with main focus on ‘breaking’ or ‘exclusive’ news. In no time, our stories got picked up by the likes of Forbes, Foxnews, Gizmodo, TechCrunch, Engadget, The Verge, Macrumors, and many others. Want to know more about us? Head here.

голоса
Рейтинг статьи
Ссылка на основную публикацию