ExtactFilePath(Application->Exename);
相对路径和当前路经是有区别的

解决方案 »

  1.   

    new File("init.txt");
    文件的操作必须是绝对路径才可以
      

  2.   

    不好意思,发错了,误入了java区
      

  3.   

    String currentPath = System.getProperty("user.dir");
    File targetFile = new File(currentPath + File.separator + "init.txt");
      

  4.   

    多谢 yuanmeng163(今天我有空)结贴了.yuanmeng163:20
      

  5.   

    这样也可以:BufferedReader br = new BufferedReader(new FileReader("init.txt"));