去SUN的JAVA社区上看看吧,我记得以前专门有一个问答系列讲这个的。^_^

解决方案 »

  1.   

    Runtime.getRuntime().exec("cmd /c start dir");
      

  2.   

    import java.io.*;public class RunText
    {
        public static void main(String[]args)
        {
         try
         {
             Runtime.getRuntime().exec("cmd /c start dir");
         }
         catch(IOException e)
         {
             e.printStackTrace();
         }
        }
    }
      

  3.   

    String sCmdLine = "";
          String sDir = "d:/test"
          sDir.replace('/',File.separatorChar);
          Process pr;
          //Delete all the files in test directory.
          sCmdLine = "cmd /c  del /q " + sDir + File.separatorChar + "*.*";
          pr = Runtime.getRuntime().exec(sCmdLine);
          pr.waitFor();
      

  4.   

    同意
    Runtime.getRuntime().exec("cmd /c start dir");
      

  5.   

    import java.io.*;public class RunText
    {
        public static void main(String[]args)
        {
         try
         {
             Runtime.getRuntime().exec("cmd /c start dir");
         }
         catch(IOException e)
         {
             e.printStackTrace();
         }
        }
    }
    //我觉得这个方法就最好了!简单明了!自己扩充一下就OK了!