阅读286 返回首页    go 阿里云 go 技术社区[云栖]


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

一、发现问题

由于tomcat内存溢出,在windows下修改了catalina.sh,然后通过ssh传到linux服务器上,执行catalina.sh时出现如下错误:

Cannot find ./catalina.sh   
This file is needed to run this program  


二、尝试解决

使用sh catalina.sh命令执行,结果没有设置javahome,然后在catalina.sh里面添加:JAVA_HOME=/usr/lib/jvm/jdk1.5.0_16;  再次执行sh catalina.sh,错误如下:

The BASEDIRenvironmentvariable is not defined correctly   
This environmentvariable is needed to run this program  


三、解决方案

.sh文件都不是可执行文件,于是找到命令:chmod +x *.sh,这个命令的意思是让所有的.sh文件都可执行。再次执行sh catalina.sh通过,然后用sh startup.sh成功启动。


原帖地址:https://blog.sina.com.cn/s/blog_63533db30100kl5a.html


最后更新:2017-04-03 20:19:10

  上一篇:go J2EE中关于tomcat的maxIdle、maxActive、maxActive相关配置
  下一篇:go 压力测试工具ab.exe简介