2

I am trying to read a file placed in the resources folder in my java project. I went trough many topics how to handle that but I cannot succeed coming up with NullPointerException. Could you please help me?

How the folder tree looks like

I have already tried many versions of code and this is the latest snippet that also fails:

BufferedReader br = new BufferedReader(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream("/small.in")))

Samuel Philipp
  • 10,631
  • 12
  • 36
  • 56
supercolo
  • 171
  • 1
  • 8

0 Answers0