Runtime runtime = new Runtime();
String fileName = "c:\\test.txt";
String commandStr = "rundll32 url.dll,FileProtocolHandler "+fileName;
runtime.exe(commandStr );
或者
Runtime runtime = new Runtime();
String fileName = "c:\\test.txt";
String commandStr = "notePad "+fileName;
runtime.exe(commandStr );
或者
Runtime rt=Runtime.getRuntimee();
rt.exec("C:\\Program Files\\Accessories\\Wordpad D:\\xxxx.txt");