title: How to read a file placed in the resources folder?
body: <p>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?</p>
  
  <p><a href="https://i.stack.imgur.com/3hFvE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3hFvE.png" alt="How the folder tree looks like"></a></p>
  
  <p>I have already tried many versions of code and this is the latest snippet that also fails:</p>
  
  <p><code>BufferedReader br = new BufferedReader(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream("/small.in")))</code></p>