Actually I am working Wolfram Mathematica
,we don't have any functions for running external programs, so I want to do this App using Java technology.
In my organization, C
developing team, developed one Application and given to us in a .exe
format.Know I want to run that .exe
file from Java
.
I have a .exe
name as ThMapInfratab1-2.exe
under C:/Users/Infratab Bangalore/Desktop/Rod's
directory.
once we run the .exe
file, automatically I takes .txt
file as a input name as TherInput.txt
from the same directory (C:/Users/Infratab Bangalore/Desktop/Rod's
)
For my conformation, I run the ThMapInfratab1-2.exe
file manually using command prompt in the following way.it's working great.
C:\Users\Infratab Bangalore\Desktop\Rod's>ThMapInfratab1-2.exe
Finally .exe
file exports t .txt
files as a output into same directory(C:/Users/Infratab Bangalore/Desktop/Rod's
).
These same thing, I want to do using Java
.can you explain with my directories.
For this, I wrote the following code but it's not working.
import java.io.IOException;
public class ProcessBuilderSample {
public static void main(String args[]) throws IOException {
Process process = new ProcessBuilder(
"C:\\Users\\Infratab bangalore\\Desktop\\Rod's\\ThMapInfratab1-2.exe")
.start();
}
}
If anyone knows,suggest me.
Thanks.
.