Java调用外部exe程序方法

用java调用外部.exe程序的方法:

 

public class Demo{
     public static void main(String args[]){
     Runtime rn = Runtime.getRuntime();
     Process p = null;
     String exeFile = "";
     try{
       exeFile = "D:\\EditPlus 2\\editplus.exe";
       p = rn.exec(exeFile);
     }catch( Exception e ){
       System.out.println( " ERROR exec Editplus.exe " );
     }
    }

}

 
 

深圳人才网 深圳招聘网 深圳人才招聘网 深圳人才大市场 

企业、个人免费注册,获取想要的 深圳 软件工程师招聘信息 月薪最低3000-8000,更有高端猎头职位! 

www.szrcwz.com                                                                                                                                           

                  Google 提供的广告

posted @ 2010-09-29 09:20  栈长  阅读(554)  评论(0编辑  收藏  举报