修改调用外部程序异常的错误提示信息

This commit is contained in:
DuanDongmei
2018-11-20 13:04:37 +08:00
parent bec11857d0
commit ffd9c2ec44
12 changed files with 58 additions and 27 deletions

View File

@@ -668,8 +668,9 @@ public class PxyObjKeyringController extends BaseController {
String cmdarray[] = new String[] {cmd1, cmd2 ,sb.toString() };
BufferedReader br = null;
BufferedReader bre = null;
Process exec=null;
try {
Process exec = Runtime.getRuntime().exec(cmdarray);
exec = Runtime.getRuntime().exec(cmdarray);
exec.getInputStream();
br = new BufferedReader(
new InputStreamReader(exec.getInputStream()));
@@ -744,6 +745,9 @@ public class PxyObjKeyringController extends BaseController {
} catch (IOException e) {
e.printStackTrace();
}
if (exec != null)
exec.destroy();
}
return result;
}