I am getting some problem while executing binary executable file using Java code.
My Executable file is running perfectly on Terminal(Linux os) using following command
./ab0818 < ab0818.challenge
where "ab0818" is executable file and "ab0818.challenge" is input file.
I will get 0 exit code after running this command in terminal
My Code is Bellow.
System.out.println("Running the batch script");
Process p = Runtime.getRuntime().exec("./ab0818 < ab0818.challenge");
p.waitFor();
System.out.println("is.read() = "+p.exitValue());
when I am run my code it will never come out of wait(waitFor()) process and my program never terminates.
My question is there any alternative way to execute command using java code or is there any modification needed in my code.
Thanks in Advance, -Viraj