Skip to content
Advertisement

how to start stop tomcat server using CMD?

I set the path for the tomcat and set all variables like

  1. JAVA_HOME=C:Program Files (x86)Javajdk1.6.0_22
  2. CATALINA_HOME=G:springworkserverapache-tomcat-6.0.29
  3. CLASSPATH=G:springworkserverapache-tomcat-6.0.29libservlet-api.jar;G:springworkserverapache-tomcat-6.0.29libjsp-api.jar;.;

When I go to bin folder and double click on startup.bat then my tomcat starts and when I double click on shutdown.bat tomcat stops.

But I want using CMD start and stop the tomcat. And in any folder I write command startup.bat the server will start and when I write shutdown.bat the server will stop.

Advertisement

Answer

Add %CATALINA_HOME%/bin to path system variable.

Go to Environment Variables screen under System Variables there will be a Path variable edit the variable and add ;%CATALINA_HOME%bin to the variable then click OK to save the changes. Close all opened command prompts then open a new command prompt and try to use the command startup.bat.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement