Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT在jdk11环境无法启动 #273

Open
tongJerry opened this issue May 10, 2024 · 6 comments
Open

MQTT在jdk11环境无法启动 #273

tongJerry opened this issue May 10, 2024 · 6 comments

Comments

@tongJerry
Copy link

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

@ChangingFond
Copy link
Contributor

JDK 11 is not supported.

@DongyuanPan
Copy link
Contributor

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

What exactly went wrong?

1 similar comment
@DongyuanPan
Copy link
Contributor

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

What exactly went wrong?

@tongJerry
Copy link
Author

现在的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
Copy link
Contributor

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

@tcjc5214
Copy link

支持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}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants