java 代吗
public static void main(String[] args) throws IOException {
String f = "D:\\test.txt"; //要打开的文件路径
Runtime r = Runtime.getRuntime();
r.exec("cmd /c start " + f);
}