首先如果直接使用 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的更多相关文章

  1. Tomcat启动报错:This file is needed to run this program

    Tomcat版本为 8.5.29. 1.情景 kill调用tomcat进程后,重启tomcat报如下错误: Cannot find /usr/local/apache-tomcat-/bin/setc ...

  2. windows中修改catalina.sh上传到linux执行报错This file is needed to run this program解决

    windows中修改catalina.sh上传到linux执行报错This file is needed to run this program解决 一.发现问题 由于tomcat内存溢出,在wind ...

  3. linux下启动tomcat出现“This file is needed to run this program ”

    使用sh startup.sh启动tomcat 出现This file is needed to run this program 原因.sh文件都不是可执行文件,于是找到命令: chmod +x * ...

  4. Cannot find ./catalina.sh The file is absent or does not have execute permission This file is needed to run this program(问题解决)

    web项目没有打成包,直接放在了linux服务器上. 进入tomcat/bin目录,执行启动的时候出现如下错误: 解决方法: 在tomcat 的bin目录下 执行这条命令chmod +x *.sh   ...

  5. linux篇-tomcat:Cannot find /usr/local/tomcat1/bin/setclasspath.sh

    首先看下报错代码: Cannot find /usr/local/tomcat1/bin/setclasspath.sh This file is needed to run this program ...

  6. 报Cannot find /usr/local/tomcat/bin/setclasspath.sh错误

    错误如下: [root@RSP-DEVWEB03 bin]#sh startup.sh Cannot find /usr/local/tomcat8081/bin/setclasspath.sh Th ...

  7. Tomcat问题之 启动 Cannot find /usr/local/tomcat/bin/setclasspath.sh

    在linux启动startup命令报Cannot find /usr/local/tomcat/bin/setclasspath.sh  使用: unset CATALINA_HOME命令得以解决   ...

  8. 普通用户操作tomcat项目时报:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable is needed to run this program

    在使用普通用户更新tomcat项目适合出现这个信息,Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At ...

  9. linux tomcat 启动报错 Cannot find /etc/bin/setclasspath.sh

    这是由于tomcat/bin/catalina.sh文件中有一个设置变量的方法 $CATALINA_HOME 有的tomcat中需要默认此值 $CATALINA_HOME=tomcat地址

随机推荐

  1. liunx笔记

    Zolertia IPv6/6LoWPAN Ubidots client Son Han Border Router with Raspberry Pi for LLN with TelosBs Co ...

  2. ACM-Fire Net

    题目描述:Fire Net   Suppose that we have a square city with straight streets. A map of a city is a squar ...

  3. c# 占位符 {0} {1}

    占位符就是先占住一个固定的位置,等着你再往里面添加内容的符号.站位符由{数字}组成,数字由0开始编号. 第1个占位符:{0} 第2个占位符:{1} 第2个占位符:{2} 初学C#之变量.占位符.转义符 ...

  4. javascript 对象只读

    var person = {}; Object.defineProperty(person, "name", { writable: false, value: "nic ...

  5. mybatis今年笔记

    1.读取配置文件:用的就是解析Xml文件的技术 2.mybatis是支持自己写dao层的,但是没有必要. mybatis做的事情: 第一个创建代理对象,第二个在代理对象中调用方法. 3.相同的注解如果 ...

  6. Arduino - Nano针脚分配时需要注意的事项

    0.1为Rx.Tx 针脚,这两个针脚一般作为串口使用,非串口设备尽量不占用该针脚.2.3为中断口,分别对应中断0.中断1,需要中断功能的设备,必须接入此.2-13.A0-A5,共18个针脚,都可以作为 ...

  7. zabbix监控oracle之orabbix安装

    zabbix服务器安装配置 zabbixserver中安装该软件 mkdir /opt/orabbix cp orabbix-1.2.3.zip /opt/orabbix cd /opt/orabbi ...

  8. 全面掌握Nginx配置+快速搭建高可用架构 一 random_index_module 随机主页

    修改default.conf 保存重载Nginx,完成配置 自动随机选择主页 string要替换的内容,replacement表示替换后的内容 示例 效果,只替换了第一个 如果要替换所有的,需要用到s ...

  9. 多线程开发之NSThrea

    创建并启动 先创建线程,再启动 // 创建   NSThread *thread = [[NSThread alloc] initWithTarget:self selector:@selector( ...

  10. 吴裕雄--天生自然 JAVASCRIPT开发学习:函数

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...