第一:修改startup.bat
SET JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_131
SET CATALINA_HOME=D:\tomcat8
第二:修改shutdown.bat
SET JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_131
SET CATALINA_HOME=D:\tomcat8
第三:修改service.bat
SET JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_131
SET CATALINA_HOME=D:\tomcat8
SET PR_DISPLAYNAME=tomcat8
第四:添加服务
在DOS界面下,进入Tomcat解压目录的bin目录,
输入命令:service remove tomcat6
service.bat install
如果安装成功,会提示:The service 'Tomcat6(或者你修改以后的 SERVICE_NAME)' has been installed