Tag: createprocess

从Java调用Python

我想从Java调用python脚本。 我的python版本是2.5,Java是6。 我目前的代码: try{ Process p= Runtime.getRuntime().exec(“path/dirs/file.py”); p.waitFor(); } catch (InterruptedException ex){ System.out.println(ex.getMessage());} } 我收到的错误是: Java.IO.IOException:无法运行程序文件名:CreateProcess error = 193,%1不是有效的Win32应用程序