3.3. 在 Microsoft Windows 上运行 Hello World
Hello World 示例创建了一个与代理的连接,发送一条消息,其中包含到 hello-world-example 队列的问候队列,然后接收它。成功时,它会将收到的消息输出到控制台。
使用 maven 构建模块,并额外复制依赖项及其输出:
cd <source-dir> mvn clean package dependency:copy-dependencies -DincludeScope=runtime -DskipTests运行示例:
$ java -cp "target\classes\;target\dependency\*" org.apache.qpid.protonj2.client.examples.HelloWorld