aspose file tools
The moose likes Beginning Java and the fly likes Comunicate two Applications in one machine in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Comunicate two Applications in one machine in Java" Watch "Comunicate two Applications in one machine in Java" New topic

Comunicate two Applications in one machine in Java

Carlos PQ

Joined: May 07, 2003
Posts: 8
i would like to develop two differents applications that can comunicate with the other.
Both app will run in the SAME machine (so, i dont know if i still should use sockets... sockets are useful to comunicate apps running in different machines, no?)
Can someone help me??
Thank you very much.
Tom Purl
Ranch Hand

Joined: May 24, 2002
Posts: 104
How do you want them to communicate? Could you give us a general example? A lot of people could take a "shot in the dark" for this problem, but that probably wouldn't help you much.

Tom Purl<br />SCJP 1.4
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12888
One advantage of using sockets would be that if you ever need to move one application to another machine it will be simple.
Kathy Sierra
Cowgirl and Author
Ranch Hand

Joined: Oct 10, 2002
Posts: 1572
Howdy -- if both applications are written in Java, you can use RMI. It handles all the low-level details of communicating over the sockets, and you get to act (almost) as though you are making local method calls. It's much higher-level than sockets and can free you to concentrate more on other things. You don't have to write your own protocol, since you're just making method calls.
And RMI is *very* easy to learn.

Co-Author of <a href="" target="_blank" rel="nofollow">"Head First Design Patterns"</a><br /> <br />Just a Jini girl living in a J2EE world.
Prasad Babu

Joined: May 23, 2002
Posts: 1
Using sockets would be better and easiest way to communicate between two applications running on the same machine or different machines.
rocket mass heater kickstarter
subject: Comunicate two Applications in one machine in Java