title: Properties file could not be found by getResourceAsStream(). Check the CLASSPATH or class loader
body: <p>This is from an open source project where there is nearly no support. Compilation of the project went well. But I cannot test or install because of a particular property file cannot be found. I have search up and down the internet and not able to find any solutions. The organization of the director is a little bit unconventional.  </p>
  
  <p>some directories.
  core/src/main/java/org/mskcc/cbio/portal/util/Config.java.</p>
  
  <pre><code>String props = "portal.properties";
  InputStream in = this.getClass().getClassLoader().getResourceAsStream(props);
  ...
  </code></pre>
  
  <p>more directoires.
  src/main/resources/portal.properties.</p>
  
  <p>This last src directory has only one subdirectory main,
  and the main directory has only one resources subdirectory.
  The file that could not be found is located here.</p>
  
  <p>I am using java 1.7.  Maven 3.0.5
  The command I used is mvn install</p>
  
  <p>I must be missing one simple configuration somewhere.</p>
  
  <p>There got to be some who can resolve this easily.</p>