Java程序打开图片文件
import java.io.*;
public class Main {
public static void main (String[] args) {
File picture;
picture = new File("C:\\Users\\d\\Pictures","001.png");
// 运行cmd命令执行程序
Runtime runtime = Runtime.getRuntime();
try { runtime.exec("cmd /c " + picture.getAbsolutePath());
}
catch (IOException e){}
// runtime.exec("cmd /c " + "C:\Users\d\Pictures");
}
}