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

created at 07-30-2021 views: 11


It is because the version of javac used for compilation is inconsistent with the version of java used for running, resulting in an error. When IDEA is compiled, the default jdk is built-in, and the jdk in CMD is configured according to the path, and the two versions are different. Need to modify the compilation suite in idea.


ctrl+shift+alt+s, open the project settings, modify the JDK and SDK used by the project


Recompile the jar after modification and it can run normally

created at:07-30-2021
edited at: 07-30-2021: