从 Java 应用程序发送消息
How do I send a message from a Java app to another app? In Delphi and C# we have the SendMessage
api:
But I was not able to find it on Java.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Java 是一种独立于平台的语言。如果您想做一些特定于平台的事情,则必须调用一些本机代码。您可以使用 JNI 来实现此目的。另外,您可以检查以下问题以了解其他一些选项: 如何使用 winapi 函数在java中?
Java is a platform-independent language. If you want to do something very platform-specific, you will have to call some native code. You can use JNI for that purpose. Also, you can check the following question for some other options: How to use winapi functions in java?
您必须使用 JNI http://java.sun 进行此类调用.com/developer/onlineTraining/Programming/JDCBook/jni.html
You have to make that kind of calls using JNI http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jni.html
什么样的消息?
您可以使用套接字、RMI, HTTP、CORBA - 实施将取决于您想要如何开发和部署客户端和服务器。
如今,让应用程序相互通信的一种常见方法是使用 Web 服务、SOAP 或 REST。没有人知道你是互联网上的一只狗;如果您是基于 HTTP 的 Web 服务,则没有客户端知道您所使用的语言。
What kind of message?
You can use sockets, RMI, HTTP, CORBA - the implementation will depend on how you want to develop and deploy the clients and servers.
One common way to have apps talk to each other these days is using web services, SOAP or REST. No one knows you're a dog on the Internet; no client knows the language you're written in if you're an HTTP-based web service.