2 Replies Latest reply: Jun 16, 2008 5:33 PM by 807601 RSS

    about file path in filereader

    807601

      I try to link a fixed "h:/" and a file's name variable. but it report i/o error. I have checked the dicName work well. so I think the problem is the filePath variable. can anyone help me?
      thanks.
      try {
      String dicName=jtxtInput.getText();//get dictionary name from jtextfield

      String filePath="h:/"+dicName;

      FileReader fr = new FileReader(filePath);

      ........
      }catch(NullPointerException e){
      System.out.println("null");
      }catch (IOException ex) {                   
      System.out.println("i/o error");
      }