如何使用CMD启动,停止Tomcat服务器? [英] how to start stop tomcat server using CMD?

查看:2668
本文介绍了如何使用CMD启动,停止Tomcat服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设置为Tomcat的路径和设置所有变量,如

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


  1. JAVA_HOME = C:\\ Program Files文件(x86)的\\的Java \\ jdk1.6.0_22

  2. CATALINA_HOME = G:\\ springwork \\服务器\\ Apache的Tomcat的6.0.29

  3. <$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;.;

  1. JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_22
  2. CATALINA_HOME=G:\springwork\server\apache-tomcat-6.0.29
  3. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆