title: Reading from src/main/resources gives NullPointerException
body: <p>In my Maven project, I have a xls file in src/main/resources.
  When I read it like this:</p>
  
  <pre><code> InputStream in = new
   FileInputStream("src/main/resources/WBU_template.xls");
  </code></pre>
  
  <p>everything is ok.</p>
  
  <p>However I want to read it as InputStream with getResourceAsStream. When I do this, with or without the slash I always get a NPE.</p>
  
  <pre><code>     private static final String TEMPLATEFILE = "/WBU_template.xls";
       InputStream in = this.getClass.getResourceAsStream(TEMPLATEFILE);
  </code></pre>
  
  <p>No matter if the slash is there or not, or if I make use of the getClassLoader() method, I still get a NullPointer.</p>
  
  <p>I also have tried this :</p>
  
  <pre><code>URL u = this.getClass().getResource(TEMPLATEFILE);
  System.out.println(u.getPath());
  </code></pre>
  
  <p>the console says.../target/classes/WBU_template.xls 
  and then get my NullPointer.</p>
  
  <p>What am I doing wrong ?</p>