Trouble in calling system commands from Java
<p>i have this problem:
I have created a bash script that performs some tasks. At one point this script call a java program. This java program perform some wsdl tasks and in one point have to call an external fortran program that perform a simulation and put the outcomes inside a file "oucomes.dat". program.exe is perfectly executed but the java program seems unable to open the file created by the fortran program. The code in the java program that call the fortran simulation is:</p>

<pre><code>Runtime.getRuntime().exec("./script.sh");
</code></pre>

<p>where script.sh contains </p>

<pre><code>    #!/bin/bash
    ./program.exe
</code></pre>

<p>When i call first program.exe and then the java program the java program can read prefectly "outcomes.dat". The problem is that i have to call program.exe from inside of java because i need some data in realtime from a wsdl service and eventually send data back to the wsdl service. So i guess that the problem is in the form that i call program.exe from inside the java. One solution may be to split the code in java in two program and putting between the to program a call to program.exe. But i would like a faster solution (in terms of CPU and memory usage). Which is the correct form to call the program.exe in order to allow the java program to read the "outcome.dat"? 
PS: i use linux.</p>
