H
hrn
Hi,
I have problems with this code fragment.
..
..
..
String exe = "external1.exe";
String exe2 = "external2.exe";
Process rt = Runtime.getRuntime().exec(exe1);
rt.waitFor();
System.out.println("Finished executing external program");
..
..
When I run this code, it runs perfectly, but when I changed third line
to [ Process rt = Runtime.getRuntime().exec(exe2); ] it never stops.
It holds at fourth line [ rt.waitFor(); ] and fifth line is never
executed. Windows Task Manager shows that external2.exe is still
running. When I call both external1.exe and external2.exe from command
line, they run and stop in expected way and they don't need any user
intervention to work and stop at the end. I need help.
Thanks in advance.
I have problems with this code fragment.
..
..
..
String exe = "external1.exe";
String exe2 = "external2.exe";
Process rt = Runtime.getRuntime().exec(exe1);
rt.waitFor();
System.out.println("Finished executing external program");
..
..
When I run this code, it runs perfectly, but when I changed third line
to [ Process rt = Runtime.getRuntime().exec(exe2); ] it never stops.
It holds at fourth line [ rt.waitFor(); ] and fifth line is never
executed. Windows Task Manager shows that external2.exe is still
running. When I call both external1.exe and external2.exe from command
line, they run and stop in expected way and they don't need any user
intervention to work and stop at the end. I need help.
Thanks in advance.