java.io.IOException: Cannot run program “az”: CreateProcess error=2, 系统找不到指定的文件。

在windows环境运行环境调用时需要添加 cmd.exe /c
String[] cmd = {"cmd", "/c", "az -v"};
Runtime.getRuntime().exec(cmd);

posted @ 2023-12-05 19:29  npe0  阅读(49)  评论(0编辑  收藏  举报