1
我想从java调用python文件。但它会抛出以下错误。从java调用python文件会抛出错误
java.io.IOException: Cannot run program "python": CreateProcess error=2, The system cannot find the file specified
的代码,我曾尝试是:
Process p = Runtime.getRuntime().exec("python C:\\Project\\Script\\Test.py");
BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
System.out.println(in.readLine());
可能是什么问题呢?
我想下面的链接可以帮助你,再次【JAVA的ProcessBuilder无法查找文件指定](https://stackoverflow.com/questions/28204342/java-processbuilder-cannot-find-file-specified) –