[Solved] Error running ‘tomcat:run‘: Cannot run program “tomcat:run“

Error running ‘Tomcat: run’: cannot run program “Tomcat: run” (in directory “D: \ myideaproject \ springmvc \ spring \ Web”): CreateProcess error = 2, the system cannot find the specified file.

reason:

You need to use the MVN Tomcat: run command.

The following problems may occur during operation

The reason may be that there is a problem with Maven’s default Tomcat. The solution is to add a Tomcat plug-in

Add the following codes to pom.xml

<plugin>
  <groupId>org.apache.tomcat.maven</groupId>
  <artifactId>tomcat7-maven-plugin</artifactId>
  <version>2.2</version>
  <configuration>
    <port>8080</port>
    <path>/</path>
  </configuration>
</plugin>

Then start with the MVN tomcat7: run command

Read More: