String execStr="unzip -P "+password+" "+xx.zip+" -d "+unzipFolder;
Process process=Runtime.getRuntime().exec(execStr);
File unzipFile=new File(unzipFolder);
我把压缩文件解压到unzipFolder目录下,然后再取unzipFolder,发现里面的数据并不完整,这应该是后台程序解压还没完全,java程序就去读取造成的,不知道有什么办法可以知道外部调用是否完成另外
String execStr="unzip -P "+password+" "+xx.zip+" -d "+unzipFolder;
Runtime.getRuntime().exec(execStr).waitFor();
System.out.println("waitFor end");
我在这里调用了waitFor();主线程好象跑到这里就停了,没有打印出"waitFor end",请问具体怎么用