In java 8, I start a process to run the python file using Process and ProcessBuilder
When the process is running, it asks me for the input.
I see in ProcessBuilder has a method redirectInput, I tried and it worked well. But the problem is the input can't be static. It always changes according to the value that the python process.
Is there any way to send an input to the running process without using redirectInput?
In java
//create process builder and process to run python code
ProcessBuilder pb = new ProcessBuilder(PYTHON, CODE_FOR_RECORD_LINKAGE)
.redirectInput(new File(INPUT_RECORD_LINKAGE))
.redirectOutput(new File(OUTPUT_RECORD_LINKAGE))
.redirectError(new File(ERROR_RECORD_LINKAGE));
Process p = pb.start();
In command line
0/10 positive, 0/10 negative
Do these records refer to the same thing?
(y)es / (n)o / (u)nsure / (f)inished