title: Loading a properties file from a path that is not in my class path
body: <p>Hmm simple task but how do i load properties file from path that is not in my class path?</p>
  
  <p><strong>for example:</strong> i have simple java file that i execute like this :
  foo.jar d:/sample/dir/dir/app1.properties
  and in the code i do :</p>
  
  <pre><code> public boolean InitConfig(String propePath) {
           prop = new Properties(); 
           try {
  
              InputStream in =  this.getClass().getClassLoader().getResourceAsStream(propePath);
              prop.load(in);
              return true;
          } catch (IOException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
              return false;
          }
       }
  </code></pre>
  
  <p>where propePath is :  d:/sample/dir/dir/app1.properties<br>
  and InputStream in is always null. 
  why does this happen?</p>