我正在使用 comet 服务器,我希望它与 C++ 交互。

发布于 2024-07-15 12:22:11 字数 267 浏览 2 评论 0 原文

我正在使用 persevere 来编写控制远程硬件的应用程序。 Persevere 是用 Java 编写的,不提供替代 API。

我使用基于 Web 的 GUI 作为控制面板。 到目前为止,一切都很好。

我可以像 dojo 一样使用 REST 通道获取和设置数据,但问题是我真的不知道如何使用 REST 通道。 我应该使用哪个库来执行此操作?

I am using persevere for an application I am writing that controls remote hardwere.
Persevere is written in Java and doesn't supply an alternative API.

I am using a web-based GUI as the control panel. So far, so good.

I can get and set data using REST channels like dojo does but the problem is that I don't really know how to use REST channels. Which library should I use to do so?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

兮颜 2024-07-22 12:22:11

如果您使用 gcc 作为工具链,您可以嵌入带有 GCJ 的 JVM 来在您的应用程序中运行 persevere。 GCJ 使用它的 CNI 接口(比 JNI 容易得多)。 我使用该方法在 C++ 应用程序中使用 Java 脚本。 您甚至可以将 persevere jar 编译到本机库中,并使用 GCJ 将其链接到您的应用程序。

最好的参考是 GCJ 文档
还有一份 Linux Journal 包含文章Embedded Java with GCJ,您可以阅读。
您还可以研究使用 gcj 的应用程序

If you use gcc as your toolchain you can embed a JVM with GCJ to run persevere inside your application. GCJ makes it easy to call C++ from Java with it's CNI interface (much easier than JNI). I used that method to use Java scripting inside our C++ application. You can even compile the persevere jar into a native library and link it to your app with GCJ.

The best reference is the GCJ Documentation.
There is also a Linux Journal contains the article Embedded Java with GCJ that you can read.
You can also study applications that use gcj.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文