情景
coding平台上,使用自带“构建计划”自动化部署tomcat项目
遇到问题
coding远程执行脚本,启动tomcat项目报错:
[2021-07-14 17:43:30] Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
[2021-07-14 17:43:30] At least one of these environment variable is needed to run this program
解决办法
修改tomcat项目的配置文件:bin/catalina.sh
在文件中,首行添加语句“export JAVA_HOME=/usr/local/jdk1.7.0_71”,java路径写自己的路径