How to Solve JAVA Error: error: A JNI error has occureed

Java error reporting

Notebook eslip ide error

error: a JNI error has occurred
solution:

Cause: this problem is caused by the error that the Java class file compiled by the higher version of JDK attempts to run on the lower version of JVM
method 1:
ensure that the versions of JVM (Java command) and JDK (javac command) are consistent. If it is a Windows version, enter the Java – version and javac – version commands on the command line to check whether the versions are consistent
if the versions are the same: see method 2.

If the versions are inconsistent: modify the environment variable classpath,
and then delete and uninstall the unnecessary versions in the system
Restart, delete javac, and regenerate the generated *. Class (* represents the main class name)
method 2:
if they are consistent, but still can not solve the problem, you must not compile directly with javac on the command line, but with compilers such as eclipse and NetBeans. Because many compilers come with javac instead of the compiler in the operating system. If your compiler is eclipse, you need to set the JDK version in the project properties by

-->java compiler --> Enable project specific settings -->
compiler compliance level

Set the compiler compliance level to the same version as the JVM (the version shown in Java – version on the command line).

Read More: