title: Java .jar gives "The handle is invalid" message but running program in Netbeans does not
body: <p>Java .jar gives "The handle is invalid" message but running program in Netbeans does not. Any ideas where to begin would be helpful. This programs moves databases from one IP to another. </p>
  
  <pre><code> private String[] readSourceFile() {
          //This method returns an array of strings to populate the IP drop down list
          ArrayList&lt;String&gt; arr = new ArrayList&lt;&gt;();
          String strLine;
          try {
              FileInputStream fstream = new FileInputStream("SourceIPlist.txt");
              BufferedReader br = new BufferedReader(new InputStreamReader(fstream));
              while ((strLine = br.readLine()) != null) {
                  arr.add(strLine);
              }
              in.close();
              br.close();
              fstream.close();
          } catch (FileNotFoundException ex) {
              JOptionPane.showMessageDialog(null, ex.getMessage());
          } catch (IOException ei) {
               JOptionPane.showMessageDialog(null, ei.getMessage());
          }
          return arr.toArray(new String[arr.size()]);
  
      }
  </code></pre>