我对Java环境很陌生,我正在尝试使用 https://github.com/eclipse-californium/californium运行一个Coap服务器
我克隆了git回购。然后在回购文件夹中运行mvn clean install。现在我想在californium/demo-apps/cf-helloworld-server/中运行hello演示。
下一步是什么?
我打开文件夹cd demo-apps/cf-helloworld-server,然后运行
mvn clean installmvn compile它工作正常,现在如何运行服务器?
如果我跑:
java target.classes.org.eclipse.californium.examples.HelloWorldServer我知道这个错误
Error: Unable to initialize main class org.eclipse.californium.examples.Server
Caused by: java.lang.NoClassDefFoundError: org/eclipse/californium/elements/exception/ConnectorException发布于 2022-09-21 11:08:45
请建立不仅是一个演示应用程序,这不是从零开始工作。
相反,使用以下方法构建父(杯根文件夹)
mvn清洁安装
然后切换到应用程序目录,例如“demo/cd-helloworld-server”。在那里启动服务器
"java target/cf-helloworld-server-3.7.0-SNAPSHOT.jar“-jar
你得到了输出:
Californium (Cf) Server-Starter (c) 2020,Bosch.IO GmbH等
使用:服务器(HelloWorldServer\MulticastTestServer)
按照下面的用法:
"java target/cf-helloworld-server-3.7.0-SNAPSHOT.jar -jar HelloWorldServer“
然后你运行HelloWorldServer。
https://stackoverflow.com/questions/73789211
复制相似问题