Start maven eclipse project error: Perhaps you are running on a JRE rather than a JDK?

Scenes

  Created a maven project, complete configuration information about the project, plans to start the project through maven in eclipse maven build.

  

In the above image input tomcat7: run. The results of the project during the startup process error, the error message is: Perhaps you are running on a JRE rather than a JDK ?.

Problem analysis and solutions

  When the project build path specified for the project is jre1.8, not jdk1.8. At this point you need to modify the eclipse java configuration options. As shown below:

     

 

 

By adding the figure jdk directory of your local computer installation, and then check use.

 

  After a step towards, to re-build path for the project.

 

  First of all, before deleting the configuration for the project jre1.8.

 

  Second: Right-projects, build path, and then re-add the figure below jre.

 

     

Double click JRE System Library, the following pop-up window:

   

 

 Select jre jdk1.8.0 of.

At last

  Re-use the eclipse maven build to start, run tomcat7: run. You will be able to restart the project.

  Outstanding issues related blog links: https://www.jianshu.com/p/1ed0ec397575 

Guess you like

Origin www.cnblogs.com/codechangeword/p/12058304.html