title: Loading resource fails at server-side
body: <p>I have a library that load the resources in the following way:</p>
  
  <pre><code>BufferedReader r = new BufferedReader(
           new InputStreamReader(classLoader.getResourceAsStream(String.format("%s.txt", filename)), "UTF8")
  );
  </code></pre>
  
  <p>Library's tests run fine.</p>
  
  <p>After that another webapp (spring-boot) uses that library as a dependency (with Maven). But! If I run that webapp from Intellij - works fine. But when I upload it to server, or run it locally with <code>java -jar</code> it fails with: </p>
  
  <pre><code>Caused by: java.lang.NullPointerException: null
      at java.io.Reader.&lt;init&gt;(Reader.java:78)
      at java.io.InputStreamReader.&lt;init&gt;(InputStreamReader.java:97)
  </code></pre>
  
  <p>Any ideas??</p>