我正在尝试从 Fantom 进程调用风扇命令。这是它从 Fantom 运行的错误,它从命令行正确运行。你认为问题可能是什么?
class Main {
Void main() {
buf := Buf()
Process() {
command = ["fan <pod>::<type>.<method>"]
out = buf.out
}.run.join
outStr := buf.flip.readAllStr
}
}
这是我得到的错误:
sys::IOErr: java.io.IOException: Cannot run program "fan <pod>::<type>.<method>":
CreateProcess error=2, The system cannot find the file specified
java.lang.ProcessBuilder.start (Unknown)
fan.sys.Process.run (Process.java:141)
PDFCommandLine::Main.main (Main.fan:10)
java.lang.reflect.Method.invoke (Unknown)
fan.sys.Method.invoke (Method.java:559)
fan.sys.Method$MethodFunc.callOn (Method.java:230)
fan.sys.Method.callOn (Method.java:139)
fanx.tools.Fan.callMain (Fan.java:185)
fanx.tools.Fan.executeType (Fan.java:147)
fanx.tools.Fan.execute (Fan.java:41)
fanx.tools.Fan.run (Fan.java:308)
fanx.tools.Fan.main (Fan.java:346)