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.
File dir = new File("./files");
File[] directoryListing = dir.listFiles();
for (File file : directoryListing) {
array.add(new FileInputStream(file.getPath()));
System.out.println(file.getPath());
}
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?
Note: I recently switched to IntelliJ and I am not yet comfortable with it