I think of using in windows a named pipe to communicate between two apps written in Java and C. Normally i use socket connection to do this, but now i have to cancel this idea a
Named pipes are much harder to get right than using sockets. Conceptually they are simpler. However making them reliable and reasonably fault tolerant is much harder than for sockets.
I would suggest you reconsider sockets, this is designed for communication between processes. Can you clarify why you cannot use sockets? The reason I ask is that named pipes actually used sockets over loopback in reality.
A named pipe is an OS construct. You can create the named pipe in your OS and then it can be accessed as if it were a file by Java and C, or any other program. Communication between processes via file is very difficult to get right (if not impossible) For example, you will have no idea that when you write to the named pipe, that anything is reading it unless you design your own flow control protocol. (Very difficult to test in all cases)
You may have heard of PipedInputStream and PipedOutputStream and these classes can only be used in the same process (making them pretty useless)
EDIT: If you want an independant view of the most common and possibly the most sensible way to send data I suggest you try google.
java sockets - 2,210,000 hits
java named pipes - 90,000 hits
So perhaps sockets is 25x more sensible than named pipes. (and more supportable as there more tutorials and people who have experience with them)