由于手残,不小心把测试环境tomcat删除了。再重新安装过程中遇到Cannot find /apache-tomcat-8.5.41/bin/setclasspath.sh的问题。
问题描述:
1.首先出现Neither the JAVA_HOME nor the JRE_HOME environment variable is defined ,但是我 /etc/profile 中配置了JAVA_HOME,JRE_HOME, 执行 source /etc/profile
2.执行完,后执行sh startup.sh ,遇到Cannot find /apache-tomcat-8.5.41/bin/setclasspath.sh 问题
3.按照一下url配置仍然不好使。https://blog.csdn.net/wb96a1007/article/details/60968138
4.期间尝试过各种方法,包括修改问题文件权限,重新设置 catalina.sh中的CATALINA_HOME,CATALINA_BASE配置
问题解决:
1.回家睡了一觉,第二天来了重新执行sh startup.sh , source /etc/profile,仍然
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 。
2.在setclasspath.sh,最上端添加JAVA_HOME和JRE_HOME两个环境变量
export JAVA_HOME=/home/jdk1.8.0_20
export JRE_HOME=/home/jdk1.8.0_20/jre
问题得以解决。