Tomcat项目报错:eval: /usr/java/bin/java: not found

报错信息 : eval: /usr/java/bin/java: not found
Tomcat项目报错:eval: /usr/java/bin/java: not found_第1张图片

解决办法 1、:

1、查找java路径:

# which java
/usr/lib/jvm/jdk-10.0.1/bin/java

2、查看jdk版本

#java -version
openjdk version "1.8.0_195"
OpenJDK Runtime Environment (build 1.8.0_195-8u265-b01-0ubuntu2~20.04-b01)

3、添加下面的JAVA环境!

#vi /etc/profile 

export JAVA_HOME=/usr/lib/jvm
export JRE_HOME=/usr/lib/jvm/jdk-10.0.1
export CLASSPATH=$JRE_HOME/lib/rt.jar:$JRE_HOME/lib/ext
export PATH=$PATH:$JRE_HOME/bin

最后更新环境配置

# source /etc/profile

解决办法 2、:

打开Tomcat安装目录下的bin文件下的setclasspath.sh,在文档开头添加如下语句:

export JAVA_HOME=你的jdk路径

export JRE_HOME=你的jre路径

参考链接:
ubuntu下安装tomcat,shutdown时报错:./catalina.sh:1:eval:/home/xxx/jdk/jre/bin/java:not found :https://blog.csdn.net/sjx_5937681/article/details/81909445

linux启动tomcat报错XXX/jre/bin/java:not found :
https://blog.csdn.net/su330494482/article/details/102678562

Tomcat启动报错jre环境没定义,关闭报错 ./catalina.sh: 1: xxx/bin/java not found
https://blog.csdn.net/chenbetter1996/article/details/80456071

https://blog.csdn.net/chenbetter1996/article/details/80456071

你可能感兴趣的:(tomcat)