public static void main ( String [ ] args ) throws Throwable { String homeDir = getHomeDir ( args ) ; System . setProperty ( TRACE_PARSER_HOME , homeDir ) ; String dataDir = homeDir + File . separator + "data" + File . separator ; System . setProperty ( TRACE_PARSER_DATA , dataDir ) ; if ( ! initLOG4JProperties ( homeDir ) && ! initLOG4JXml ( homeDir ) ) { logger . error ( "Failed to initialize loggin, no configuration. Defaults are used." ) ; } logger . info ( "log4j configured" ) ; Ss7ParseParameters par = null ; String persistDir = homeDir + File . separator + "data" ; try { BufferedInputStream bis = new BufferedInputStream ( new FileInputStream ( persistDir + File . separator + "Ss7ParseParameters.xml" ) ) ; XMLDecoder d = new XMLDecoder ( bis ) ; par = ( Ss7ParseParameters ) d . readObject ( ) ; d . close ( ) ; } catch ( Exception e ) { // we ignore exceptions } Main main = new Main ( ) ; // main.processCommandLine(args); main . boot ( persistDir , par ) ; }
private int httpPort = - 1 ;