import java.io.*;public class Test2{
  public static void main( String[] args ){
   File abc = new File( "abc" );
   abc.mkdir();
  }
}

解决方案 »

  1.   

    public class TestDir
    {
        public TestDir()
        {
        }
        public static void main(String[] args) throws Exception
        {
            java.io.File file = new java.io.File("e:/tmp/tmp/Test");
            file.mkdirs();    }}
      

  2.   

    import java.io.File;public class temp {
      public static void main(String[] args) {
        try {
          File path = new File("c:\\jtemp");
          path.mkdir();
        }
        catch (Exception ex) {
          ex.printStackTrace();
        }
      }
    }
      

  3.   

    楼上都重复3次了。我不重复了,来趁分滴~~~hoho~~~