I want to call a c++ executable from a java program. But after I call it, nothing happens. Then after I close the program, there an error window appears, which says abnormal program termination.
The code looks like this :
try {
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("discretize.exe");
} catch (Exception exc) {/*handle exception*/
exc.printStackTrace();
}
and the windows error that appears look like this :
Finally I found the answer.
The problem was the command prompt didn’t show up. So after searching google, I found a tip that suggested I simply put:
before the path of the file. So I changed my code to look like this:
.. and voila, the command prompt shows!