import java.io.*;
public class Example10_3 {
public static void main(String args[]) {
try{
Runtime ce=Runtime.getRuntime();
File file=new File("c:/windows","Notepad.exe");
ce.exec(file.getAbsolutePath());
file=new File("C:\\Program Files\\Microsoft Edge","IEXPLORE www.sina.com ");
ce.exec(file.getAbsolutePath());
}
catch(Exception e) {
System.out.println(e);
}
}
}
java 打开记事本和浏览器特定网站
最新推荐文章于 2022-01-25 22:21:26 发布