public static void invokeMain ( String className , String [ ] args ) { try { Class < ? > clazz = null ; if ( ClassServiceUtility . getClassService ( ) . getClassFinder ( null ) != null ) clazz = ClassServiceUtility . getClassService ( ) . getClassFinder ( null ) . findClass ( className , null ) ; if ( clazz == null ) clazz = Class . forName ( className ) ; Method method = clazz . getMethod ( "main" , PARAMS ) ; Object [ ] objArgs = new Object [ ] { args } ; method . invoke ( null , objArgs ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } }
Invokes the main method of the provided class name .