把下面这个小例子Copy过去编译运行。
import java.io.*;
public class fileTest {
  public fileTest(String filepath) {
    try
    {
      File thePath = new File("C:\\p\\pra\\"+filepath);
      if (thePath.isDirectory() == false) {
        thePath.mkdirs();
      }      String fullPath="C:\\p\\pra\\"+filepath+"\\rrrr.txt";
      File theFile=new File(fullPath);
      if (theFile.exists() == true) {
        theFile.delete();
      }
      theFile.createNewFile();
      RandomAccessFile fout = new RandomAccessFile(fullPath, "rw");
      fout.writeBytes("I am a Chinese");
      fout.close();    }catch(Exception e)
    {
      e.printStackTrace();
    }
  }
  public static void main(String[] args) {
    String path=args[0];
    fileTest fileTest1 = new fileTest(path);
  }}