報錯內容:
Error: A JNI error has occurred, please check your installation and try again
Exception in thread “main” java.lang.UnsupportedClassVersionError: Demo 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
解決方法:
系統中以前安裝了一次JRE8u164,在沒有卸載的前提下又安裝了JDK11.0.2,估計是產生了衝突,刪除JRE8u164即可。
擴展內容
有關JDK,JRE,JAVA SE,JAVA EE,JAVA ME的概念和區別見:
https://www.cnblogs.com/In-order-to-tomorrow/p/3652315.html