Runtime.getRuntime().exec("你的.exe");

解决方案 »

  1.   

    Runtime.getRuntime().exec()不知道是否好用
      

  2.   

    Runtime.getRuntime().exec()
    可以
      

  3.   

    你可以查看一下 j2sdk 的文档就明白了。
      

  4.   

    class Xxxx {
        public static void main(String args[]) {
            Runtime rt = Runtime.getRuntime();
            Process ps = null;        try {
                ps = rt.exec("notepad");
                ps.waitFor();
            } catch (Exception e) {
                System.out.println("无法运行记事本.");
            }
        }
    }
      

  5.   

    楼主,这个帖子的主人和你一样。。看看去http://expert.csdn.net/Expert/topic/2671/2671926.xml?temp=.6977045
      

  6.   

    如果是2000系统或者nt  public static void main(String args[]) {    try {
          String[] cmd = new String[3];
     cmd[0] = "cmd.exe"; //如果是win98的话 cmd[0]="command.com "; linux是"/bin/sh";
          cmd[1] = "/C";
          cmd[2] = "move e:\\test.txt d:\\test.txt"; //你要操作的exe, 
    //比如打开一个notepad 那么就是 cmd[2]="notepad";      Runtime rt = Runtime.getRuntime();
          Process proc = rt.exec(cmd);
        }
        catch (Throwable t) {
          t.printStackTrace();
        }
      }