JNI Error in Eclipse on Windows 8.1
The error "A JNI error has occurred. Please check your installation and try again" often signifies a mismatch between the Java version used for compilation and execution. In this case, it appears that your program was compiled using Java JDK 12, but you're attempting to run it on a Java runtime environment (JRE) version 8.
Resolution:
To resolve this issue, follow these steps:
Recompile your program using the correct Java version (CDK 12) by running the following command in the command prompt:
javac -version
Run your program using the same Java version:
java -version
Once both the compilation and execution steps are using the same Java version, the JNI error should no longer occur.
The above is the detailed content of How to Fix a 'JNI Error' in Eclipse on Windows 8.1 Due to Java Version Mismatch?. For more information, please follow other related articles on the PHP Chinese website!