public void openLogTxt() {
try {
Runtime run = Runtime.getRuntime();
String[] args = new String[3];
args[0] = "cmd";
args[1] = "/c";
args[2] = "notepad.exe C:\\home\\cuilm\\importexcellog.txt";
System.out.println(args.toString());
run.exec(args);
} catch (IOException e) {
e.printStackTrace();
}
}
用记事本打开TXT文本文件
最新推荐文章于 2025-02-24 12:45:48 发布