Rafael Colucci
Rafael Colucci

Reputation: 6078

SendMessage from Java app

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.

Upvotes: 1

Views: 5611

Answers (3)

duffymo
duffymo

Reputation: 308733

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.

Upvotes: 0

Olaf
Olaf

Reputation: 6289

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?

Upvotes: 3

Marcelo
Marcelo

Reputation: 11308

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

Upvotes: 2

Related Questions