This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Communicaton between Java programs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Communicaton between Java programs" Watch "Communicaton between Java programs" New topic
Author

Communicaton between Java programs

Tony Bateman
Ranch Hand

Joined: Mar 21, 2005
Posts: 38
Hi,

I have a Java application running on a machine; I also have another Java application which I think is running on the same machine, but for arguments sake let's assume it is not (in case I am wrong).

What are the possible ways that I can get data to be exchanged between an object in one application with an object in the other? Ideally I would like the solution to be as easy as possible to implement (wouldn't we all).

Kind regards,

Tony.
Mr. C Lamont Gilbert
Ranch Hand

Joined: Oct 05, 2001
Posts: 1170

Easy as possible would be Java's Remove Method Invocation API. See the documentation for RMI.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41155
    
  45
If you want to exchange objects, you can open a ServerSocket on one machine, and connect to it through a Socket from the other. Then you can serialize objects over the connection.
If you want to invoke methods, RMI might be the way to go, although it does add some complexity.
If you don't mind considerable complexity, you can run an embedded Tomcat with Axis, and make web service calls. But that sounds like overkill for what you describe.


Ping & DNS - my free Android networking tools app
Tony Bateman
Ranch Hand

Joined: Mar 21, 2005
Posts: 38
The RMI sounds like a good solution because I will want to call methods on the object.

Thanks!

- Tony.
 
 
subject: Communicaton between Java programs
 
Similar Threads
java windows applications
Memory
remote JDBC access on dBase files ... on a SCO machine
JDBC and SQL Server 2000 Part II Question
remote display java application