I set the path for the tomcat and set all variables like
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_22
CATALINA_HOME=G:\springwork\server\apache-tomcat-6.0.29
CLASSPATH=G:\springwork\server\apache-tomcat-6.0.29\lib\servlet-api.jar;G:\springwork\server\apache-tomcat-6.0.29\lib\jsp-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.
Best Answer
Add
%CATALINA_HOME%/bin
to path system variable.Go to
Environment Variables
screen underSystem Variables
there will be aPath
variable edit the variable and add;%CATALINA_HOME%\bin
to the variable then clickOK
to save the changes. Close all opened command prompts then open a new command prompt and try to use the commandstartup.bat
.