下面是在另一个tomcatLZZ目录下面做的配置,打开service.bat rem Guess CATALINA_HOME if not defined set CURRENT_DIR=%cd% set CATALINA_HOME=d:/tomcatLZZ if not "%CATALINA_HOME%" == "" goto gotHome rem set CATALINA_HOME=%cd%
第三行是关键,直接在这里指定好了,别让系统猜了。 运行安装
D:/tomcatLZZ/bin>service install tomcatLZZ Installing the service 'tomcatLZZ' ... Using CATALINA_HOME: d:/tomcatLZZ Using CATALINA_BASE: d:/tomcatLZZ Using JAVA_HOME: C:/Program Files/Java/jdk1.6.0_10 Using JVM: C:/Program Files/Java/jdk1.6.0_10/jre/bin/server/jvm.dll The service 'tomcatLZZ' has been installed.