我正在尝试从代码中对类文件执行 JAD 反编译器:
Process p = Runtime.getRuntime().exec("c:\\1\\jad.exe c:\\1\\EIn.class");
//All paths are correct, "c:\\1\\jad.exe c:\\1\\EIn.class" wotks when I run it in cmd
当我调试时,我没有收到任何错误,调试器移动到下一行......
如果我说:
int res = p.waitFor();
它只是挂起。
更新:
BufferedReader in = new BufferedReader(new InputStreamReader(p.getErrorStream()));
String str = null;
while ((str = in.readLine()) != null) { //Stucks here
}