I have a Fortran exe. What I need to do.... I need to call that exe through java in Linux. After that it should ask for input file and output file. This is my code:
Process process = new ProcessBuilder("/home/admin/Documents/file.out",
"input","output").start();
InputStream is = process.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String line;
System.out.printf("Output of running %s is:", Arrays.toString(args));
while ((line = br.readLine()) != null) {
System.out.println(line);
}
It is running but nit asking for input and output file