A JNI error has occurred, please check your installation and try again IntelliJ

터미널에서 클래스파일 실행하니까 에러

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

java.lang.UnsupportedClassVersionError: com/eomcs/lang/ex01/Exam0300 has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0

A JNI error has occurred, please check your installation and try again IntelliJ

이클립스 컴파일러 JDK 버전이 더 높아서 에러 발생
이클립스 컴파일러 JDK 버전이랑 터미널 JDK 버전이랑 달라서 그런 거 같다

이클립스 컴파일러 버전

A JNI error has occurred, please check your installation and try again IntelliJ

A JNI error has occurred, please check your installation and try again IntelliJ

A JNI error has occurred, please check your installation and try again IntelliJ

이클립스와 동일한 버전의 JDK를 설치해준다

JDK설치
$ sdk install java 17.0.1-zulu

A JNI error has occurred, please check your installation and try again IntelliJ

설치가 다 되면 이 버전을 기본으로 설정할 거냐고 물어본다.
Do you want java 17.0.1-zulu to be set as default? (Y/n): y

이제 잘 된다ㅎㅎ

프로젝트 빌드 질문

안녕하세요 강사님,

처음부터 버전이 안맞는다고 실행이 되지않고 있는데, 제가 intellij는 처음이라 애를 먹고있습니다 ㅠㅠ

어떻게 하면  해결이 될까요??

  • A JNI error has occurred, please check your installation and try again
    • Process 'command 'C:/Program Files/Java_SDK/jdk1.8.0_251/bin/java.exe'' finished with non-zero exit value 1 
     
  • 오류는 이 두가지가 뜹니다 ㅠㅠ

1

안녕하세요. kdfjk님

JDK 11 버전으로 다시 설치해주세요^^!

댓글

2

A JNI error has occurred, please check your installation and try again IntelliJ

JDK를 11버전으로 깔고 cmd창에서 확인도 하고 , 프로젝트 창에서 삽입도했는데 진행이 되지않습니다 ㅠㅠ

Execution failed for task ':HelloSpringApplication.main()'.

> Process 'command 'C:/Program Files/Java/jdk-11.0.8/bin/java.exe'' finished with non-zero exit value 1

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

무엇일까요 ㅠㅠ

댓글

3

gradle JAVA 버전 관련 오류일 수 있겠네요.

다음 이미지를 참고하셔서 Gradle JVM을 java 11 버전으로 맞추고 실행해보시겠어요^^?

A JNI error has occurred, please check your installation and try again IntelliJ

댓글

4

A JNI error has occurred, please check your installation and try again IntelliJ

앗 해결했습니다 ㅠㅠ 감사합니다 ㅠㅠ 

근데 제가 oracle을 다운받아서 8080이라는 포트번호를 이미 사용하고있는데,

변경해서 사용해도 괜찮겠죠..?

그리고 제 버전이 부트2.3.3버전인데 따로 변경해야할것은 없나요?

댓글

5

ㅎㅎ 네 다행입니다.

포트 번호는 당연히 변경해도 됩니다. 그리고 스프링 부트 버전도 2.3.x를 사용하시면 됩니다^^

댓글

6

A JNI error has occurred, please check your installation and try again IntelliJ

아하 감사합니다 !!! 열심히 듣겠습니다 ㅎㅎ

댓글

7

A JNI error has occurred, please check your installation and try again IntelliJ

전 버전까지 11로맞추고 실행하였는데도 서버가 켜지지않으면 어떻게해야하나요?

전날까지 잘되다가 갑자기 되질않습니다

댓글

8

안녕하세요 은재님 서버가 어떻게 켜지지 않는지 자세한 스크린샷이나 자료를 남겨주시겠어요?

댓글

jdk 버전과 내 프로젝트를 실행하는 STS IDE의 java 컴파일러 버전이 달라서 발생한 것.

Project->Propertise->java compiler->Enable project specific 항목 체크 -> Compiler complisance level 을 변경

자바 JNI error has oocurred 오류 해결법

오랜만에 자바를 구동하기 위해 이클립스를 설치했습니다. 그런데 다음과 같은 오류가 떴습니다. Error. A JNI error has occurred, please check your installation and try again이라고요. 자바 버츄얼 머신이..

comsperger.tistory.com

I wrote a simple project in Java, using default configuration in IntelliJ IDEA. I built the project and ran it successfully. I was using Java 1.9. I wanted to check if it runs with Java 1.8. I changed the JRE in the configuration from Java 1.9 to Java 1.8 and ran my project. The following error occurred:

Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.UnsupportedClassVersionError: Main has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:763) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) at java.net.URLClassLoader.access$100(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:368) at java.net.URLClassLoader$1.run(URLClassLoader.java:362) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:361) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)

This question: IntelliJ Error: A JNI error has occurred, please check your installation and try again is different because it has NoClassDefFoundError instead of UnsupportedClassVersionError. This question A JNI error has occurred, please check your installation and try again in Eclipse x86 Windows 8.1 is also different because it regards Eclipse, not IntelliJ IDEA.

asked Aug 25, 2018 at 11:53

A JNI error has occurred, please check your installation and try again IntelliJ

I found a solution, editing a component configuration in .idea/misc.xml. It was

<component name="ProjectRootManager" version="2" languageLevel="JDK_1_9" project-jdk-name="9.0" project-jdk-type="JavaSDK"> <output url="file://$PROJECT_DIR$/out" /> </component>

and I changed it into

<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="8.0" project-jdk-type="JavaSDK"> <output url="file://$PROJECT_DIR$/out" /> </component>

Then an applet appeared, which helped me add a new JDK (Java8) and I was able to run my project and the error disappeared.

answered Aug 25, 2018 at 11:53

A JNI error has occurred, please check your installation and try again IntelliJ

banan3'14banan3'14

2,9562 gold badges19 silver badges41 bronze badges

Problem is our manifest files doesn't match the project. What I did is solved my problem. I had provided codes for chat client and server.

First I opened a new Java project.then created a package ,and then what I did is created two classes (you can give any name since we change it later.) for my 2 existing classes.

Then I opened existing classes in notepad,copy all the content and paste them to newly created classes. An error occurs saying

names doesn't match

. Rename compilation units. Then run..worked for me.

RN92

1,3061 gold badge13 silver badges31 bronze badges

answered Feb 26, 2019 at 2:33

3

Not the answer you're looking for? Browse other questions tagged java intellij-idea or ask your own question.

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

JNI Error in Windows CMD 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.

How do I fix Java JNI error has occurred?

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.

Why JNI error has occurred?

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.

How do I check my Java version Intellij?

In the Project Structure dialog Ctrl+Alt+Shift+S , select SDKs. Select the necessary JDK version if you have several JDKs configured, and open the Documentation Path tab on the right.