S
sandancer
Hi,
I'm a project manager and a developer in my team is writing some java
code to run an exe that is part of a vendor application we are
implementing. The developer is claiming there is problems with the
vendors exe as it just return the value 259 constantly for exitValue -
even when he can see it's finished i.e. it hangs returning this value
in his code when he can see it's done. The exe sits on a Windows 2003
server and the code snippet is:
// Runs the batch job
Process p = Runtime.getRuntime().exec("path-to\vendor-app.exe
-batch=EXEQHOLD");
// Cause the current Thread to wait until an exit value is returned.
// The convention for normal termination is zero
int exitValue = p.waitFor();
I was a programmer in a past life but not java but my gut feeling is
that maybe we should be more thorough with this before we go back to
blaming the vendor. Can anyone comment on this or suggest a better way
to launch an exe and wait for it in code to finish?
Many thanks,
s
I'm a project manager and a developer in my team is writing some java
code to run an exe that is part of a vendor application we are
implementing. The developer is claiming there is problems with the
vendors exe as it just return the value 259 constantly for exitValue -
even when he can see it's finished i.e. it hangs returning this value
in his code when he can see it's done. The exe sits on a Windows 2003
server and the code snippet is:
// Runs the batch job
Process p = Runtime.getRuntime().exec("path-to\vendor-app.exe
-batch=EXEQHOLD");
// Cause the current Thread to wait until an exit value is returned.
// The convention for normal termination is zero
int exitValue = p.waitFor();
I was a programmer in a past life but not java but my gut feeling is
that maybe we should be more thorough with this before we go back to
blaming the vendor. Can anyone comment on this or suggest a better way
to launch an exe and wait for it in code to finish?
Many thanks,
s