1

How do I send a message from a Java app to another app? In Delphi and C# we have the SendMessage api:

SendMessage API

But I was not able to find it on Java.

Ajay
  • 18,086
  • 12
  • 59
  • 105
Rafael Colucci
  • 6,018
  • 4
  • 52
  • 121
  • are you meaning MSMQ, maybe accesible via J++ (if still exists), that's MS reactions to the Websphere MQ, maybe I wrong ... implemented in NET Framework 1.1.xxx – mKorbel Jun 03 '11 at 20:13
  • maybe yes, for example here :-) http://stackoverflow.com/questions/506022/java-and-msmq – mKorbel Jun 03 '11 at 20:14

3 Answers3

3

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?

Community
  • 1
  • 1
Olaf
  • 6,249
  • 1
  • 19
  • 37
2

You have to make that kind of calls using JNI http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jni.html

Marcelo
  • 11,218
  • 1
  • 37
  • 51
0

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.

duffymo
  • 305,152
  • 44
  • 369
  • 561