IPC (inter process communication) between python and java

Named pipes could be the answer for you. See: Create a temporary FIFO (named pipe) in Python?


I attempted to code a solution using pipes but it seems that they just aren't well suited to sending multiple messages back and forth with potentially large data attached. Rather, they seem ideal for opening a "worker" style program that runs, responds, and dies.

Looking into socket programming, I found a fantastic resource here: https://web.archive.org/web/20080913064702/http://www.prasannatech.net/2008/07/socket-programming-tutorial.html

The tutorial presents TCP and UDP variants of a simple chat program written in 4 languages. I ended up using and modifying the TCP Java client and Python server.


This is the opensource solution Google uses to do IPC between Java and Python. https://code.google.com/p/protobuf/

Recommended.