嵌入式码头与其父应用程序之间的通信
我有 Windows 服务应用程序,我想为我的应用程序使用 Web 界面而不是 gui。但我想知道如何使 jetty 中的 servlet 与其托管应用程序(Windows 服务应用程序)进行通信。
谢谢。
i have windows service app and i want to use web interface for my app instead of gui. But i wonder how to make a servlet in jetty communicate with its hosted application - the windows service app.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于您要从 JVM(码头)内部到 JVM(您的服务)外部,因此您可能必须使用套接字,除非您想深入研究 JNI(Java 本机接口),但这可能比您想要的更多工作。
我假设您的 Windows 服务是一个实际的本机 Windows 应用程序,而不是带有服务包装器的 Java 应用程序。
祝你好运。
Since you are going from inside a JVM (jetty) to outside the JVM (your service), you will probably have to use sockets, unless you want to delve into JNI (java native interface), but that's probably more work than you want.
I am assuming that your windows service is an actual native windows app and not a Java app with a service wrapper around it.
Good luck.
您可以使用相同的类加载器通过以下方式解决问题:
You can use the same classloader to solve the problem by: