用JAVA打开本地文件

 

public class Text5 {

public static void main(String[] args) {

Runtime runtime=Runtime.getRuntime();

try{

runtime.exec("cmd /c start C://a.txt");

}catch(Exception e){

System.out.println("Error!");

}

}

}

 

posted @ 2011-03-23 00:19  qm4050  阅读(220)  评论(0)    收藏  举报