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.
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:
javacare inconsistent, so
javac -version, the operation is very smooth, as expected, the versions are the same:
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.)
Window->Preferences->Java->Compilercaused by the inconsistency between the compiled version and the running version, as shown in the figure:
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:
In the small window that pops up, select the item that needs to be changed, and continue as shown in the figure:
As shown in the end, please Apply and Close.
Then, OK, you're done! (If it still fails, forgive me for being helpless)