title: Netbeans FileReader FileNotFound Exception when the file is in folder?
body: <p>so the problem is that I am having exception thrown each time I try to load the code below on NetBeans or Eclips, but when I try to run it thru TextMate everything works fine! </p>
  
  <p>I tried to put the absolute address, changed the text file etc.. didn't help! </p>
  
  <p>Can someone help me or  tell why it won't run with IDE? </p>
  
  <p>Thanks</p>
  
  <pre><code>void loadFile() {
      try {
          list = new LinkedList&lt;Patient&gt;();
  
          FileReader read = new FileReader("a.txt");
          Scanner scan = new Scanner(read);
  
          while (scan.hasNextLine()) {
              String Line = scan.nextLine();
              String[] subArray = new String[5];
              subArray = Line.split(",");
              int a = Integer.parseInt(subArray[4]);
  
              list.add(new Patient(Integer.parseInt(subArray[0]), subArray[1], subArray[2], subArray[3], a));
          }
      } catch (FileNotFoundException e) {
          JOptionPane.showMessageDialog(null, "The file does not exist!" + "\nProgram is terminating.", "File Not Found", JOptionPane.INFORMATION_MESSAGE);
          System.exit(0);
      }
      cap = list.size();
      search_names = new int[cap];
      for (int i = 0; i &lt; list.size(); i++) {
          search_names[i] = i;
      }
      setNames(search_names);
  }//end loadFile
  </code></pre>
  
  <p>Debug log:
  <code>Have no file for /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsfd.jar
  Have no file for /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Resources/Java/JavaRuntimeSupport.jar
  Have no file for /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/laf.jar
  Have no file for /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/sunrsasign.jar
  }</code></p>