import java.io.*;
public class ShowJava {
public ShowJava() {
}
private static String fileName = "C:/Users/Toyeeb/Desktop/help.txt";
public static void main(String[] args) {
Runtime rt = Runtime.getRuntime();
String exePath = "notepad.exe " + fileName;
try {
rt.exec(exePath);
} catch (IOException e) {
System.out.println("can't find the file!");
}
}
}
相关资源:打开文本文档