I am trying to read a resource that will be included into a .JAR, but I get a nullPointer for the following:
bReader = new BufferedReader(new InputStreamReader(
this.getClass().getResourceAsStream("resources/" + fileName)));
Using a File however, works fine..
bReader = new BufferedReader(new FileReader(new File("resources/" + fileName)));
Assuming your IDE/Maven/ANT/Gradle/build process will include contents of "resources" in jar at root, try finding it at "/".
bReader = new BufferedReader(new InputStreamReader(
this.getClass().getResourceAsStream("/" + fileName)));
UPDATE:
Make sure the "resources" folder is configured as a resource folder.