private static Properties load ( String configFilePath ) { Properties props = new Properties ( ) ; BufferedInputStream fis = null ; try { File configFile = new File ( configFilePath ) ; fis = new BufferedInputStream ( new FileInputStream ( configFile ) ) ; props . load ( fis ) ; } catch ( IOException e ) { System . err . println ( "Could not load configuration file " + configFilePath ) ; } finally { if ( fis != null ) { try { fis . close ( ) ; } catch ( IOException e ) { System . err . println ( "Error closing file stream of configuration file " + configFilePath ) ; } } } return props ; }
Load a properties file from the classpath