java - Running batch command gets stuck on Runtime.exec.waitFor() -
i run batch command java this:
string command ="cmd /c " + mpathtozip + " -tzip " + source + "foo.zip " + source + "* && exit"; try { runtime.getruntime().exec(command).waitfor(); } catch (ioexception e) { // todo auto-generated catch block e.printstacktrace(); } catch (interruptedexception e) { // todo auto-generated catch block e.printstacktrace(); } so need run command , wait until it's finished before else.
the problem jvm gets stuck @ runtime.getruntime().exec(command).waitfor();
i tried when unzipping , works fine, when zip gets stuck. also, i've tried command manualy , works.
any appreciated new threads.
Comments
Post a Comment