I set the path for the tomcat and set all variables like
JAVA_HOME=C:Program Files (x86)Javajdk1.6.0_22CATALINA_HOME=G:springworkserverapache-tomcat-6.0.29CLASSPATH=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.