以下命令全部按顺序执行
unlink /usr/bin/javac
unlink /usr/bin/jar
unlink /bin/java
ln -s /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-3.b13.el7_5.x86_64/bin/javac /usr/bin/javac ln -s /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-3.b13.el7_5.x86_64/bin/jar /usr/bin/jar ln -s /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-3.b13.el7_5.x86_64/bin/java /bin/java
然后执行
#1. 打开配置环境变量的文件 vi /etc/profile #2. 添加以下配置: export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-3.b13.el7_5.x86_64 export JRE_HOME=$JAVA_HOME/jre export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH # :wq保存退出。 #3. 让配置生效 source /etc/profile标签:bin,set,JAVA,lib,1.8,报错,usr,HOME,java From: https://www.cnblogs.com/hd92/p/17262052.html
再次执行启动broker,不报错了