apache / rocketmq-mqtt

Apache rocketmq
https://rocketmq.apache.org/
Apache License 2.0
183 stars 64 forks source link

MQTT在jdk11环境无法启动 #273

Open tongJerry opened 6 months ago

tongJerry commented 6 months ago

现在的mqtt broker在jdk11的环境下无法启动,现在是没有支持JDK8以后的版本吗?

ChangingFond commented 6 months ago

JDK 11 is not supported.

DongyuanPan commented 6 months ago

现在的mqtt broker在jdk11的环境下无法启动,现在是没有支持JDK8以后的版本吗?

What exactly went wrong?

DongyuanPan commented 6 months ago

现在的mqtt broker在jdk11的环境下无法启动,现在是没有支持JDK8以后的版本吗?

What exactly went wrong?

tongJerry commented 5 months ago

现在的mqtt broker在jdk11的环境下无法启动,现在是没有支持JDK8以后的版本吗?

What exactly went wrong? 错误提示是这样的,无法找到或者加载主类 Error: Could not find or load main class org.apache.rocketmq.mqtt.cs.starter.Startup Caused by: java.lang.ClassNotFoundException: org.apache.rocketmq.mqtt.cs.starter.Startup

ChangingFond commented 5 months ago

The error stack doesn't look like it's a JDK version related problem, you may check your server config instead.

tcjc5214 commented 4 months ago

支持jdk11 ,启动失败,是脚本问题,用了jre ,jdk11 已经没有jre 了,调整启动脚本即可启动 mqtt ,找到 /bin/runserver.sh 脚本

JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${JAVA_HOME}/jre/lib/ext:${BASE_DIR}/lib:${JAVA_HOME}/lib/ext"

JAVA_OPT="${JAVA_OPT} -classpath .:${BASE_DIR}/lib/*:${CLASSPATH}"

JAVA_OPT="${JAVA_OPT} -cp ${CLASSPATH}"