Communication between 2 Standalone Swing applications

Hi all,

I would like to communicate between 2 standalone SWING applications. Like below.

- 2 applications are running in the same system.

- If I action performs in the one application (Ex: if I enter one string value on TextField and press OK button) , I need that string value in the second application .

- If the first application close, then I need notification to 2 application that first application is closed...(some flag)

How can we do it? Does any have idea?

Thanks

[518 byte] By [nim_ramesha] at [2007-11-27 11:49:30]
# 1

Some sort of remoting. Probably the easiest way would be good old RMI, but there are other ways that would make your CV more sexy, such as web services

georgemca at 2007-7-29 18:25:41 > top of Java-index,Java Essentials,Java Programming...
# 2

Hi The problem is we are not using any Application/ Web servers for our application.

Its a plain Desktop application.

nim_ramesha at 2007-7-29 18:25:41 > top of Java-index,Java Essentials,Java Programming...
# 3

My reply still stands. RMI

georgemca at 2007-7-29 18:25:41 > top of Java-index,Java Essentials,Java Programming...
# 4

Hey thanks, Actually I don't know much about RMI. can you give me brief idea.. or some link to ideas? anyway I will seach in the google thanks

nim_ramesha at 2007-7-29 18:25:41 > top of Java-index,Java Essentials,Java Programming...
# 5

Sure. RMI is Remote Method Invocation, basically it allows you to call methods on objects which reside in another JVM (almost) as if they were running in the same JVM. You define an interface for the object that you want to remotely call, and then RMI creates an implementation of this interface at the client, which you call the methods on. The RMI mechanism takes care of the network connection and invokes the right methods on the remote object, returning any return values. It's almost trasnparent, except there is an extra exception to be handled in case there's a network failure or similar

A tutorial will explain it better than I just did!

georgemca at 2007-7-29 18:25:41 > top of Java-index,Java Essentials,Java Programming...