ProcessBuilder pb = new ProcessBuilder(commandInformation);
Process process = pb.start();
上面的代码返回错误:
java.lang.IllegalArgumentException
at java.lang.ProcessImpl.<init>(ProcessImpl.java:69)
at java.lang.ProcessImpl.start(ProcessImpl.java:30)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
at com.ConvertsImages.SystemCommandExecutor.executeCommand(SystemCommandExecutor.java:51)
at com.ConvertsImages.ImageConversion.runConvertCommand(ImageConversion.java:115)
at com.ConvertsImages.ImageConversion.runConvert(ImageConversion.java:80)
at com.ConvertsImages.ImageConversion.main(ImageConversion.java:26)
List commandInformation只有一个条目,如下所示:
["D:\Program Files\ImageMagick-6.8.6-Q16\convert.exe" "D:\ConvertFiles\ReImport_2507_1.jpg" -resize 40x40 "D:\ConvertFiles\proxy-40\ReImport_2507_1.jpg.jpg" ]
请建议。