Can someone please help me out that how execution of Inter-process communication in java is done, where a single process tries to receive from two mailboxes. I mean the send() and receive() operations?

I dont know if Java has "native" support for IPC. But there are several work-arounds. people tend to use sockets, files, and even some use RMI to do this...

But if your'e a beginner and if you're app is slightly network oriented (I think it is based on the word "mailbox"), u could use Sockets for communication.

Since u want comm between two java programs running on the same computer (am i right?) u can open sockets and communicate via the "localhost". you can pass ordinary text (by using one of the stream writers/readers over input and op streams of the socket) or u can even pass serialized objects through sockets using Object Ip and op streams.

There may also be some 3rd party libraries that hide all these background works and provide a neat interface for IPC. Try google.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.