Tomcat: Could not publish to the server.Please assign JRE to the server设置JRE

启动Tomcat时报错,提示:Could not publish to the server.Please assign JRE to the server.

就如提示所说,这是因为tomcat缺少JRE导致的,跟随以下步骤配置JRE即可。

1.首先删除异常的tomcat,这里是Tomcat9.0:

Tomcat: Could not publish to the server.Please assign JRE to the server设置JRE


2.重新添加该服务器:

Tomcat: Could not publish to the server.Please assign JRE to the server设置JRE


3.选择添加新服务器

Tomcat: Could not publish to the server.Please assign JRE to the server设置JRE


4.为添加的服务器配置JRE

Tomcat: Could not publish to the server.Please assign JRE to the server设置JRE


5.选择JDK默认或自带JRE。若可选JRE皆无效,可点击右侧的“Install JREs..”自行添加JRE路径。

Tomcat: Could not publish to the server.Please assign JRE to the server设置JRE


6.完成配置

Tomcat: Could not publish to the server.Please assign JRE to the server设置JRE


接下来Tomcat即可正常运行