首先如果直接使用 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. 官网英文版学习——RabbitMQ学习笔记(六)Routing

    有选择的接收消息. 上一节我们使用的是fanout exchange来实现消息的发布/订阅模式,这并没有给我们带来多大的灵活性——它只能够让人盲目地进行广播.而本节我们采用direct类型的交换器来实 ...

  2. 【pwnable.kr】lotto

    pwnable.好像最近的几道题都不需要看汇编. ssh lotto@pwnable.kr -p2222 (pw:guest) 直接down下来源码 #include <stdio.h> ...

  3. SQL 、LINQ日前比较

      using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; ...

  4. 【转载】webDriver拾级而上·之五 iframe的处理

    有时候我们在定位一个页面元素的时候发现一直定位不了,反复检查自己写的定位器没有任何问题,代码也没有任何问题.这时你就要看一下这个页面元素是否在一个iframe中,这可能就是找不到的原因之一. 如果你在 ...

  5. html特殊字符的写法

    符号 写法 (空格)   <(小于号) < >(大于号) > " " ®(已注册) ® ©(版权) © ™(商标) ™ (半方大的空白)   (全方大的空白 ...

  6. ng-options用法详解

    ng-options属性可以在表达式中使用数组或对象来自动生成一个select中的option列表.ng-options与ng-repeat很相似,很多时候可以用ng-repeat来代替ng-opti ...

  7. mysql字符串操作

    https://h.w.com/lin/h ) 效果: https://h.w.com huangwanlin ) 效果: huang huangwanlin ) 效果: wanlin huangxi ...

  8. Community Cloud零基础学习(三)Partner Account

    本篇参考:http://salesforce.vidyard.com/watch/bLE3QNRSej2iasw9vvc6Tk http://salesforce.vidyard.com/watch/ ...

  9. Essay写作关键:严谨的逻辑关系

    一篇好的文章并不是句子的机械堆砌,而是一个有机整体,句子和句子之间是存在严谨的逻辑关系的,要注意句子和句子之间,段落和段落之间的衔接和连贯(Coherence and Cohesion). 要写出逻辑 ...

  10. Upgrade to 17.1 from 17.0 problem:UnicodeEncodeError: 'ascii' codec can't encode character '\xc4' in position 50: ordinal not in range(128)

    最近 gentoo 从 17.0 更新到 17.1, 需要手动进行升级配置,使用 unsymlink-lib -p --finish 这一步的时候报错,报错如下: /usr/lib/python-ex ...