title: JAR does not see file directory
body: <p>I have a program that works properly in IDE but when I make an executable JAR from it and run it I get errors. Apparently, it is these lines here that cause the error.</p>
  <pre><code>File dir = new File(&quot;./files&quot;);
              File[] directoryListing = dir.listFiles();
              for (File file : directoryListing) {
                  array.add(new FileInputStream(file.getPath()));
                  System.out.println(file.getPath());
              }
  </code></pre>
  <p>I think that the problem is that the JAR doesn't see/understand my files directory in my project. How can I solve this problem?</p>
  <p>Note: I recently switched to IntelliJ and I am not yet comfortable with it</p>