code: private Properties loadProperty(String propertiesFile) {
          Properties prop = new Properties();
          try {
              InputStream in = getClass().getResourceAsStream(propertiesFile);
              prop.load(in);
              in.close();
          } catch (IOException e) {
              throw new IllegalStateException("Cannot load property file at " + propertiesFile, e);
          }
          return prop;
      }
docs: Load properties from a classpath property file.
  
  @param propertiesFile the classpath properties file to read.
  @return a <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html">Properties</a> object
  containing the properties set in the file.