private void init ( ) throws ConfigFileIOException { this . props = new Properties ( ) ; log . info ( "Reading config file: {}" , this . configFile ) ; boolean ok = true ; try { // El fichero esta en el CLASSPATH this . props . load ( SystemConfig . class . getResourceAsStream ( this . configFile ) ) ; } catch ( Exception e ) { log . warn ( "File not found in the Classpath" ) ; try { this . props . load ( new FileInputStream ( this . configFile ) ) ; } catch ( IOException ioe ) { log . error ( "Can't open file: {}" , ioe . getLocalizedMessage ( ) ) ; ok = false ; ioe . printStackTrace ( ) ; throw new ConfigFileIOException ( ioe . getLocalizedMessage ( ) ) ; } } if ( ok ) { log . info ( "Configuration loaded successfully" ) ; if ( log . isDebugEnabled ( ) ) { log . debug ( this . toString ( ) ) ; } } }
Inicializa la configuracion .