| Author |
Comunicate two Applications in one machine in Java
|
Carlos PQ
Greenhorn
Joined: May 07, 2003
Posts: 8
|
|
Hello, 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
Rancher
Joined: Mar 22, 2000
Posts: 12266
|
|
One advantage of using sockets would be that if you ever need to move one application to another machine it will be simple. Bill
|
 |
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. cheers, Kathy
|
Co-Author of <a href="http://www.amazon.com/exec/obidos/ASIN/0596007124/ref=jranch-20" target="_blank" rel="nofollow">"Head First Design Patterns"</a><br /> <br />Just a Jini girl living in a J2EE world.
|
 |
Prasad Babu
Greenhorn
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.
|
 |
 |
|
|
subject: Comunicate two Applications in one machine in Java
|
|
|