【发布时间】:2014-01-12 09:25:43
【问题描述】:
我有简单的测试类
public static void main(String[] args) throws IOException {
String[] line = {"ffmpeg -i D:\\hadoop-video\\testVideo\\xyz.mp4 %d.png"};
Runtime.getRuntime().exec(line);
}
当我尝试运行它时,我得到了
Exception in thread "main" java.io.IOException: Cannot run program "ffmpeg -i D:/hadoop-video/testVideo/xyz.mp4 %d.png": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at ImageTest.main(ImageTest.java:13)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
但是文件存在于我的 windows7 机器上的位置
D:\hadoop-video\testVideo\xyz.mp4
我尝试删除 .mp4,然后运行也无法正常工作。请提出可能的问题
【问题讨论】: