Now, I have looked into this on StackOverflow, but none of the responses solve the problem which makes me believe this is new.
I have a Java Faces project. I have a index.xhtml file and a .java file. I run a debug on the project and it does get to the following lines in my code where i try to access my folder called questions. This folder does exist in my project. It is on the same level as Web Pages, Source Packages, Test Packages, and so on. Here are my lines of code to access my directory called "questions"
File directory = new File("questions");
//get all the files from a directory
File[] fList = directory.listFiles();
for (File file : fList){ //FAILS!
System.out.println(file.getName());
}
I am at a loss. All other topics tell me that the root folder is the project folder. This is where my questions folder resides. Yet, fList must be null and I don't understand what I am doing wrong in accessing this directory.