title: Reading Properties file inside conf folder
body: <p>I have a properties file which is located under conf folder. conf folder is under the project root directory. I am using the following code.</p>
  
  <pre><code>public class PropertiesTest {
   public static void main(String[] args) {
      InputStream inputStream = PropertiesTest.class
              .getResourceAsStream("/conf/sampleprop.conf");
      Properties prop = new Properties();
      try {
          prop.load(inputStream);
      } catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  
      System.out.println(prop.getProperty("TEST"));
  }
  }
  </code></pre>
  
  <p>But I get nullpointer exception.</p>
  
  <p>I have tried using </p>
  
  <pre><code>InputStream inputStream = PropertiesTest.class
          .getResourceAsStream("./conf/sampleprop.conf");
  </code></pre>
  
  <p>and</p>
  
  <pre><code>InputStream inputStream = PropertiesTest.class
          .getResourceAsStream("conf/sampleprop.conf");
  </code></pre>
  
  <p>But all result in nullpointer exception.
  Can anyone please help.
  Thanks in advance</p>