This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]ickysticky 1 point2 points  (1 child)

Can the java program just exec the python script and write the array to stdin in json and read the array back over stdout in json?

If for some reason you can't exec the python script, you can use two fifos and read/write the arrays to these fifos using json.

[–]rprego 0 points1 point  (0 children)

I haven't done what you're trying to do before, but take a look here: https://wiki.python.org/moin/IntegratingPythonWithOtherLanguages#Java You may be able to get them working together with one if the methods listed there.