程序如下:
package nmd;
import java.io.File;
public class FileHello {
public static void main(String[] args) {
try {
Runtime ec=Runtime.getRuntime();
File file=new File("file.txt");
ec.exec(file.getAbsolutePath());
} catch (Exception e) {
System.out.println(e);
}
}
}
运行报错如下:
java.io.IOException: Cannot run program "D:\Java": CreateProcess error=193, %1 不是有效的 Win32 应用程序。
求大神指点这是神马意思?怎么才能正常显示结果呢?