如何使用CMD启动,停止Tomcat服务器? [英] how to start stop tomcat server using CMD?
问题描述
我设置为Tomcat的路径和设置所有变量,如
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 \\服务器\\ Apache的Tomcat的6.0.29
- <$c$c>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;.;$c$c>
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;.;
当我去bin文件夹,双击的startup.bat那么我的Tomcat启动时,当我双击shutdown.bat tomcat的停止。
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.
不过,我想用CMD启动和停止Tomcat。
和任何文件夹在我写命令的startup.bat
服务器将启动,当我写 shutdown.bat
服务器将停下来。
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.
推荐答案
%CATALINA_HOME%/ bin中
添加到Path系统变量。
Add %CATALINA_HOME%/bin
to path system variable.
到环境变量
在系统变量屏幕
将有一个路径
变量编辑变量并添加;%CATALINA_HOME%\\ bin中
来的变量,然后单击确定
来保存更改。关闭所有打开命令提示符然后打开一个新的命令提示符并尝试使用命令的startup.bat
。
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
.
这篇关于如何使用CMD启动,停止Tomcat服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!