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;
    }
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 ; }
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.