1. jdk and jre
(Error: java.lang.UnsupportedClassVersionError: Unsupported major.minor version 51.0)
windows-preferences-java-Installed JREs applicable to JREs Add
windows-preferences-java-compiler Compiler compliance level: Change to the same version as the previous one
Right-click on the project - properties-java compiler Compiler compliance level: Change to the same version as the previous one
Right click on the project - properties-java builde path-add library-JRE System Library y consistent JRE
2. Report an error: -Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable and mvn script match.
Solution: You can set an environment variable M2_HOME to point to your maven installation directory
M2_HOME=D:/Apps/apache-maven-3.3.1
Then in Window->Preference->Java->Installed JREs->Edit
Setting -Dmaven.multiModuleProjectDirectory=$M2_HOME in Default VM arguments
3. Report an error: java compiler level does not match the version of the installed java project facet
Solution: Find the directory where the project is located, in the .settings subdirectory, and use a text editor to open the org.eclipse.wst.common.project.facet.core.xml configuration file
Change the version version<installed facet=”java” version=”1.7”/>
The above is the relevant knowledge about common errors and solutions in myeclipse before using maven. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to Wulin.com website!