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

created at 12-05-2021 views: 5

Review

I downloaded a piece of code, `import` to `Eclipse`, and after `Build Path`, I found that there was no error. I was excited to run it. As a result... Hey, soon, a pop-up window came to me.

Solution process

I typed English into the search box tremblingly. I have to say that the Internet is really omnipotent. Soon, I saw a group of difficult brothers. The following solutions are roughly formed:

  • The versions of java and javac are inconsistent, so java -version; javac -version, the operation is very smooth, as expected, the versions are the same:

java version

emmmmm...Don't give up, continue to click on other experiences (If it is really inconsistent, then change the path and version, there are more such posts.)

  • There are custom packages beginning with java. Okay, let’s look at it again. This is indeed not the case, and there is no one...
  • The Window->Preferences->Java->Compiler caused by the inconsistency between the compiled version and the running version, as shown in the figure:

compiler

By the way, if it is different from the output version of the command line, please change it. If it is the same, then, as shown in the figure:

configure project specific settings

In the small window that pops up, select the item that needs to be changed, and continue as shown in the figure:

enable project specific settings

As shown in the end, please Apply and Close.
Then, OK, you're done! (If it still fails, forgive me for being helpless)

created at:12-05-2021
edited at: 12-05-2021: