第一个字符串成为命令。没有要执行的文件“ sh test.sh”。
更改
String[] cmd = {"sh test.sh", "/Path/to my/resource file"};至
String[] cmd = {"sh", "test.sh", "/Path/to my/resource file"};(一般使用流程构建器API)

第一个字符串成为命令。没有要执行的文件“ sh test.sh”。
更改
String[] cmd = {"sh test.sh", "/Path/to my/resource file"};至
String[] cmd = {"sh", "test.sh", "/Path/to my/resource file"};(一般使用流程构建器API)