简体   繁体   中英

Runtime exec pauses half way through execution

I'm running a Java (.jar) program from a bat script that near the end has the following (on windows)

Runtime.getRuntime().exec("svn co http://myrepository.com/someproj");
Thread.sleep(20000);

It checks out about 1/10th of the directories and 1 file and then it does nothing. I suspect the reason it is pausing on the file but I couldn't find anything. The bat script is run as an administrator.

exec命令阻塞的一个常见原因是它要么等待父进程(或控制台)的输入,要么阻塞,因为父进程没有读取子进程标准输出或错误流。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM