自动化工具 xcode 项目编译的命令行工具为什么不能在代码调用?

不贱不散 · 2020年03月17日 · 720 次阅读

xcode 项目编译成为一个命令行工具,命令行使用通过;但是在 java 代码中调用一直失败,路径也加了环境中,还是一直失败,为什么呢,求指教下~

Process p = Runtime.getRuntime().exec(tu);
br = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line = null;
while ((line = br.readLine()) != null) {
 cmdOut += line.trim() + "\n";
}
p.waitFor();
System.out.println(cmdOut);

环境

  • mac 平台
  • xcode 10.3
  • java 8
暂无回复。
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册