// must match JNDI name in jboss-client.xml or display-name in application-client.xml
String name = new Date().toString();
String applicationClientName = "ee5client_test";
String args[] = { name };
ClientLauncher launcher = new ClientLauncher();
Properties env = getENCProps(applicationClientName);
launcher.launch(mainClassName, applicationClientName, args, env);
Class<?> clientClass = ClientLauncher.getTheMainClass();
Class<?> empty[] = {};
{
Method getResult = clientClass.getDeclaredMethod("getResult", empty);