码迷,mamicode.com
首页 > 其他好文 > 详细

Cannot find tomcat目录/bin/setclasspath.sh This file is needed to run this program

时间:2020-01-24 00:08:34      阅读:122      评论:0      收藏:0      [点我收藏+]

标签:eve   set   ima   roo   tomcat   apache   图片   start   home   

首先如果直接使用 root 用户来启动 tomcat 的话,是可以正常启动的。

但是我们在 Linux 中使用普通用户启动 tomcat 报了如下错误

Cannot find /developer/apache-tomcat-8.5.50/bin/setclasspath.sh
This file is needed to run this program

原因是没有在 setclasspath.sh 上设置 JAVA_HOME 和 JRE_HOME。

解决办法:

打开 setclasspath.sh

sudo vi setclasspath.sh

然后设置 JAVA_HOME 和 JRE_HOME

技术图片

然后再使用命令 sudo ./startup.sh 重新启动 tomcat
关闭的话也要使用 sudo ./shutdown.sh 来关闭,否则会报上面的错误

Cannot find tomcat目录/bin/setclasspath.sh This file is needed to run this program

标签:eve   set   ima   roo   tomcat   apache   图片   start   home   

原文地址:https://www.cnblogs.com/train99999/p/12231616.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!