JAVA本地连接远程linux服务器执行shell脚本提示:
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
注:脚本在服务器可以运行,连接用的也是root账户,是不是权限问题,还是其他,希望哪位高手能帮忙下看看是什么问题。
下面是SHELL脚本的一段代码:
start()
{
echo "============== TOMCAT WILL BE RESTART NOW ==================="
cd /opt/apache/webapps/
rm -rf test/
cd /opt/apache-activity/bin/
./startup.sh
echo "STARTING TOMCAT complete.... ...."
sleep 5
}