I am having an issue trying to write to stdin from java.
here is my python code which would be receiving the stdin input
import sys
data = sys.stdin.readlines()
print data
I am trying to write out to stdout in java but it keeps on printing to console.
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));
out.write("i am writing to stdin");
out.flush();
However it keeps on printing in java console instead of the python shell.