The file Tomcat8.exe was not found... Either the CATALINA_HOME environment variable is not defined c

Tomcat service安装错误

命令行输入:

service install

报错:

The file Tomcat8.exe was not found...
Either the CATALINA_HOME environment variable is not defined correctly or
the incorrect service name has been used.
Both the CATALINA_HOME environment variable and the correct service name
are required to run this program.

原因:

缺少 CATALINA_HOME 环境变量,不能直接图省事在path里面加,会报错同样的错

C:\apache-tomcat-8.5.59\bin

解决方案:

1.新建环境变量CATALINA_HOME,变量值设为C:\apache-tomcat-8.5.59(自己Tomcat的安装目录)
在这里插入图片描述
2.再path变量里面添加:

%CATALINA_HOME%\bin

在这里插入图片描述

之后再命令行输入:service install

C:\Users\pc>service install
Installing the service 'Tomcat8' ...
Using CATALINA_HOME:    "C:\apache-tomcat-8.5.59"
Using CATALINA_BASE:    "C:\apache-tomcat-8.5.59"
Using JAVA_HOME:        "C:\Program Files\Java\jdk1.8.0_131"
Using JRE_HOME:         "C:\Program Files\Java\jdk1.8.0_131\jre"
Using JVM:              "C:\Program Files\Java\jdk1.8.0_131\jre\bin\server\jvm.dll"
The service 'Tomcat8' has been installed.

成功!

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值