今天下载tomcat7.0后,发现双击tomcat7.exe后闪退,通过控制台命令,发现提示如下:
G:\apache-tomcat-7.0.75-windows-x64\apache-tomcat-7.0.75\bin>tomcat7.exe
[2017-02-13 01:12:54] [warn] [ 5160] The system cannot find the Registry key for service 'tomcat7'
[2017-02-13 01:12:54] [error] [ 5160] Load configuration failed
[2017-02-13 01:12:54] [error] [ 5160] 系统找不到指定的文件。
[2017-02-13 01:12:54] [error] [ 5160] Commons Daemon procrun failed with exit value: 2 (Failed to load configuration)
[2017-02-13 01:12:54] [error] [ 5160] 系统找不到指定的文件。
重装jdk发现问题依旧,但是查找Tomcat服务的时候发现服务并不存在。
解决办法如下:
G:\apache-tomcat-7.0.75-windows-x64\apache-tomcat-7.0.75\bin>service.bat install
Installing the service 'Tomcat7' ...
Using CATALINA_HOME: "G:\apache-tomcat-7.0.75-windows-x64\apache-tomcat-7.0.75"
Using CATALINA_BASE: "G:\apache-tomcat-7.0.75-windows-x64\apache-tomcat-7.0.75"
Using JAVA_HOME: "C:\Program Files\Java\jdk1.7.0_80"
Using JRE_HOME: "C:\Program Files\Java\jdk1.7.0_80\jre"
Using JVM: "C:\Program Files\Java\jdk1.7.0_80\jre\bin\server\jvm.dll"
The service 'Tomcat7' has been installed.
问题解决。
如果要看相关文件监控的话,执行tomcat7w.exe即可。
转载于:https://blog.51cto.com/kongdexiu/1897163