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?

[1255 byte] By [EasyE0123a] at [2007-10-1 17:15:12]
# 1
Is the process expecting anything from its equivalent of System.in? Have you tried removing the waitFor() line?- Saish
Saisha at 2007-7-11 1:58:05 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2
Yeah... I actually got it working when I turned the program into a jar file.
EasyE0123a at 2007-7-11 1:58:05 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 3
That's an odd resolution, but if it works, great. Best of luck.- Saish
Saisha at 2007-7-11 1:58:05 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 4
Most likely the result of my IDE (JCreator freeware) having a crappy compiler. Which one do you find most effective?
EasyE0123a at 2007-7-11 1:58:05 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...