How do I send a message from a Java app to anot开发者_开发知识库her app? In Delphi and C# we have the SendMessage
api:
SendMessage API
But I was not able to find it on 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?
You have to make that kind of calls using JNI http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jni.html
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.
精彩评论