Runtime.getRuntime().exec("dos command");

解决方案 »

  1.   

    java.lang.Runtime.exec(java.lang.String)
      

  2.   

    Runtime.exec("cmd.exe ? /c dir c: ")
      

  3.   

    Runtime.getRuntime().exec("cmd.exe ? /c dir c: ")
      

  4.   

    楼上的兄弟:为什么这样没反应?
    public class RunDos {
      public static void main(String[] args) {
        try
        {
          Runtime.getRuntime().exec("cmd.exe ? /c dir c: ");
        }
        catch(Exception ioe)
        {
          ioe.printStackTrace();
        }
      }
    }
      

  5.   

    呵呵, tryRuntime.getRuntime().exec("cmd /c start dir c: ");