> In c++ we had named pipes which could be refered from other
> application but I am unable to find such a mechanism in standard
> java library. Does this feature exists or I will have to resort to
> loop back Socket programming to achive this.
Named pipes can be treated as ordinary files - you can read from them
and write to them using FileInputStreams and FileOutputStreams.
However Java doesn't provide any mechanism for creating them, for that
you need to call mknod() from a native method, or use an external
helper (like mknod -p).
However if you use Sockets your application will be more portable, and
has the advantage that your communicating processes don't need to run
on the same machine. (Your application does not need to handle the
"loop back" case specially as you seem to imply).
/gordon

Signature
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
On 30 Nov 2005 08:14:51 -0800, "mr.vaibhavjain@gmail.com"
<mr.vaibhavjain@gmail.com> wrote, quoted or indirectly quoted someone
who said :
>In c++ we had named pipes which could be refered from other
>application but I am unable to find such a mechanism in standard java
>library.
you have sockets, and RMI for that function. Pipes only work with in
the same JMM.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Gordon Beaton - 01 Dec 2005 06:41 GMT
> you have sockets, and RMI for that function. Pipes only work with in
> the same JMM.
Pipes are not exclusive to Java, and yes they work between processes.
The OP specifically mentioned "named pipes". He was not asking about
PipedInputStream and PipedOutputStream, which have the limitation you
mention.
/gordon

Signature
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
Roedy Green - 01 Dec 2005 08:23 GMT
>Pipes are not exclusive to Java, and yes they work between processes.
Pipes in Java refer to PipedInputStream and PipedOutputStream. These
are for intra-JVM communication only.
Pipes outside Java refer to all manner of things from output
redirection of the console in DOS to socket-like things in Unix to
complex plumbing in Burroughs.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.