Logs
[Error] A JNI error has occurred 에러 해결하는 방법
랩실외톨이
2022. 9. 19. 20:35
반응형
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 55.0),
this version of the Java Runtime only recognizes class file versions up to 52.0
이클립스로 웹 프로젝트를 돌리다가 오랜만에 알고리즘 좀 돌리려고 열심히 코드를 짜고 돌리는 순간 에러가 두둥... 장난하시나요?
원인은 자바 컴파일러의 버전 설정이 컴퓨터에 있는 것과 안 맞아서 그런 것이라고 한다.

프로젝트에서 Properties > Java Compiler 선택 후 Compiler compliance level을 맞춰주면 된다.
나 같은 경우는 1.8이어야 하는데 11로 맞춰져 있었다. (왜 저래 진짜 ㅡㅡ)
+ 자바 버전 확인 하는 법
터미널에서
java -version
돌리면 나온다!!
반응형