Hi I have external program which read each lines in input.txt file do some calculations and gives output.txt file.
I want to run linux executable file(external program) with shell script with 2 parameters as input.txt file and output write in to output.txt file. I am using MAC OS

With executable : ./vx < input.txt > output.txt and I write shell script also
Command line : ./run_vx.sh input.txt output.txt

I want to run these inside a Java Program

1) String[] cmd = {"/bin/sh", "-c", "/Users/x34/Projects/model/run_vx.sh", " input.txt","output.txt"};

2)final ProcessBuilder pb = new ProcessBuilder("./vx < input.txt > output.txt");
pb.directory(new File("/Users/x34/Projects/model/"));
final Process p = pb.start();

but above do not work
please help

Thank You