Class twiddleClass = loader.loadClass("org.jboss.console.twiddle.Twiddle"); Method[] methods = twiddleClass.getMethods(); for( int i = 0; i < methods.length; i++ ) { if( methods[i].getName() == "main") { Method main = methods[i]; Class[] types = main.getParameterTypes(); for( int j = 0; j < types.length; j++ ) { System.out.println(types[j].getName()); } String[] args2 = new String[] { "-h" }; main.invoke(null, (Object[])args2); } }