现在的Tomcat资源包都变小了,大概原因是他把自己原先内嵌的Java虚拟机环境给去掉了,转而依赖于正常的Java环境。因此需要给他配置Java的路径。在tomcat的bin目录下,执行
service.bat install
E:\project_tool\Tomcat\apache-tomcat-9.0.52\bin>service.bat install
Installing the service 'Tomcat9' ...
Using CATALINA_HOME: "E:\project_tool\Tomcat\apache-tomcat-9.0.52"
Using CATALINA_BASE: "E:\project_tool\Tomcat\apache-tomcat-9.0.52"
Using JAVA_HOME: "C:\Program Files\Java\jdk-11.0.8"
Using JRE_HOME: "C:\Program Files\Java\jdk-11.0.8"
Using JVM: "C:\Program Files\Java\jdk-11.0.8\bin\server\jvm.dll"
The service 'Tomcat9' has been installed.
E:\project_tool\Tomcat\apache-tomcat-9.0.52\bin>
他会自动把环境变量和自己的配置都整理好。
再次尝试,启动成功