启动RocketMQ报错:Please set the JAVA_HOME variable in your environment, We need java 64

在启动RocketMQ时出现以下错误解决方案

错误信息:Please set the JAVA_HOME variable in your environment, We need java 64

解决方案

  1. 修改两个文件:runbroker.shrunserver.sh
  • 将其中的这三行注释掉:
[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=$HOME/jdk/java
[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=/usr/java
[ ! -e "$JAVA_HOME/bin/java" ] && error_exit "Please set the JAVA_HOME variable in your environment, We need java(x64)!"
  • export JAVA_HOME替换为export JAVA_HOME=*JAVA_HOME中的路径*

修改完成保存重启即可

你可能感兴趣的:(Java笔记)