server.startApplication(appName);
Application app = server.getApplication(appName);
// execute the function
try {
Object result = app.executeExternal(function, funcArgs);
if (result != null) {
System.out.println(result.toString());
}
} catch (Exception ex) {
System.out.println("Error in application " + appName + ":");