错误:运行tomcat6w.exe ,提示 指定的服务未安装 unable to open the service 'tomcat6'(我用的是官网下载的解压版)
解决方法:
打开命令行提示符窗口=> 进入Tomcat安装目录==> 进入bin目录下==> 输入:service.bat install 即可
安装成功:
注意:在执行上面的步骤时可能会出现:tomcat.exe未找到、The CATALINA_HOME environment variable is not defined correctly
这就说明你的tomcat环境没配置好!下面是我的环境配置,可能冗余了,不过确实是成功的。
我的java环境变量:
JAVA_HOME: C:Program FilesJavajdk1.6.0_10
CLASSPATH: .;%JAVA_HOME%lib;%JAVA_HOME%lib ools.jar;%CATALINA_HOME%commonlibservlet-api.jar
Path:
C:Program FilesNVIDIA CorporationPhysXCommon;.;%JAVA_HOME%in;%JAVA_HOME%jrein;%SystemRoot%system32;%SystemRoot%;%SystemRoot%System32Wbem;C:Program FilesJavajdk1.6.0_10in;F:eclipse1android-sdk-windows ools;F:eclipse1android-sdk-windowsplatform-tools;E:MATLAB7inwin32;D:Program FilesTortoiseSVNin;C:Program FilesMySQLMySQL Server 5.5in;C:Program FilesMicrosoft SQL Server100ToolsBinn;C:Program FilesMicrosoft SQL Server100DTSBinn;%CATALINA_HOME%lib;%CATALINA_HOME%libservlet-api.jar;%CATALINA_HOME%libjsp-api.jar;C:jython2.5.4rc1
我的tomcat环境变量:
CATALINA_BASE: C:Program FilesApache Software Foundationapache-tomcat-6.0.37
CATALINA_HOME: C:Program FilesApache Software Foundationapache-tomcat-6.0.37
CLASSPATH: .;%JAVA_HOME%lib;%JAVA_HOME%lib ools.jar;%CATALINA_HOME%commonlibservlet-api.jar
TOMCAT_HOME: C:Program FilesApache Software Foundationapache-tomcat-6.0.37;D:j2ee1apache-tomcat-7.0.37
Path:
C:Program FilesNVIDIA CorporationPhysXCommon;.;%JAVA_HOME%in;%JAVA_HOME%jrein;%SystemRoot%system32;%SystemRoot%;%SystemRoot%System32Wbem;C:Program FilesJavajdk1.6.0_10in;F:eclipse1android-sdk-windows ools;F:eclipse1android-sdk-windowsplatform-tools;E:MATLAB7inwin32;D:Program FilesTortoiseSVNin;C:Program FilesMySQLMySQL Server 5.5in;C:Program FilesMicrosoft SQL Server100ToolsBinn;C:Program FilesMicrosoft SQL Server100DTSBinn;%CATALINA_HOME%lib;%CATALINA_HOME%libservlet-api.jar;%CATALINA_HOME%libjsp-api.jar;C:jython2.5.4rc1
注意:网上有如下做法,不知道有没有影响,大家可以尝试下
把C:Program FilesApache Software Foundationapache-tomcat-6.0.37lib中的servlet-api.jar复制一份到C:Program FilesJavajre6libext