Problem getting C++ program to execute
I've tested this section of my code with other programs such as iTunes and Firefox, and it executes flawlessly, however, when I try to execute the C++ program that I am really trying to use, i get a number of errors (although the code does compile). Is there any special precautions that must be taken to execute a C++ program? Here's the code in question:
try{
Runtime r = Runtime.getRuntime();
Process p = r.exec("C:/FlawProgram.exe");
p.waitFor();
}catch (IOException e){
e.printStackTrace();
}catch (InterruptedException f){
f.printStackTrace();
}
Among the error messages I receive when trying to run the Java program are "CreateProcess: C:\FlawProgram.exe error = 2" at several places in the package. I should also note that the C++ program executes fine on it's own, but seems to have trouble when I try to use Java to execute it. Is this a problem resulting from Microsoft's incompatibility?

