protected int executeApplication ( Object svc , String [ ] args , String orig ) { if ( svc != null && ( svc instanceof ExecS_Application ) ) { if ( svc instanceof Gen_RunScripts ) { //hook for GenRunScripts to get current class map - registered applications ( ( Gen_RunScripts ) svc ) . setClassMap ( this . classmap ) ; } if ( svc instanceof Gen_ExecJarScripts ) { //hook for Gen_ExecJarScripts to get current class map - registered applications ( ( Gen_ExecJarScripts ) svc ) . setClassMap ( this . classmap ) ; } return ( ( ExecS_Application ) svc ) . executeApplication ( ArrayUtils . remove ( args , 0 ) ) ; } else if ( svc == null ) { System . err . println ( "could not create object for class or application name <" + orig + ">" ) ; return - 1 ; } else if ( ! ( svc instanceof ExecS_Application ) ) { System . err . println ( "given class or application name <" + orig + "> is not instance of " + ExecS_Application . class . getName ( ) ) ; return - 2 ; } else { System . err . println ( "unexpected error processing for class or application name <" + orig + ">" ) ; return - 3 ; } }
Executes an application .