dcsimg
communicate with an external programm (like a unix pipe, but portable)
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, March 2, 2005 07:17 AM

hi!


i need my java app to communicate with an external program. since every execution of the binary involves time-consuming initialisation i'd like to keep it running and communicate as if i had opened a pipe in the unix fashion.



is there any chance to do this in a portable way? System.getRuntime().exec() is not right for the job afaik.


thanks,


achim.

Re: communicate with an external programm (like a unix pipe, but portable)

Posted By:   Christopher_Koenigsberg  
Posted On:   Wednesday, March 2, 2005 09:52 PM

"pipe in the unix fashion" could mean the "stdin/sdout" thing (read from stdin, write to stdout, fork and exec the processes that are "piped" together).


Or do you mean programming client and server to communicate via "unix domain sockets"? (does Java even support them? I guess they are implemented nowadays as the OS's brand of "shared memory"?)


Or do you mean IP/TCP sockets? I'd say that TCP/IP is pretty portable ... and of course you could do HTTP, SOAP etc. on top of TCP....
About | Sitemap | Contact