可以了,你查看一下 Process 那个类,有个 exec 方法的

解决方案 »

  1.   

    像下面这样调用:
    Process child = Runtime.getRuntime().exec(cmd);//调用cmd.exe,也可以是其它可执行文件
      

  2.   

    import java.lang.*;
    import java.io.*;public class LoadWinApp
    {
        public static void main(String args[]) throws IOException
        {
            Runtime r = Runtime.getRuntime();
            Process p = null;
            String strWinApp = "cmd start";
            String strWinFile = "test.xls";        if(args.length > 1)
            {
                strWinApp = args[0];
                strWinFile = args[1];
            }
            try
            {
                //p = r.exec(strWinApp);
                p = r.exec(strWinApp + " " + strWinFile);
            }
            catch(Exception e)
            {
                e.printStackTrace();
            }
        }
    }