two consecutive calls for Runtime.getRuntime.exec()

my code contains two consecutive calls for Runtime.getRuntime.exec() as follows:

runtimeref.exec(command1);

runtimeref.exec(command2);

where runtimeref = Runtime.getRuntime();

But only command1 is executed and command2 is not executed.

No exception is thrown.

what can be the reason

[325 byte] By [johnray31a] at [2007-11-26 14:55:17]
# 1
try using ProcessBuilder (new in 1.5) http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ProcessBuilder.html
suparenoa at 2007-7-8 8:43:47 > top of Java-index,Java Essentials,Java Programming...
# 2
Also, be aware of common pitfalls when using Runtime.exec(): http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html(some of which may be alleviated by using the ProcessBuilder, but not all)
Herko_ter_Horsta at 2007-7-8 8:43:47 > top of Java-index,Java Essentials,Java Programming...