in java-local/src/main/java/openwhisk/java/local/Launcher.java [87:106]
public JsonObject launch() throws Exception {
Invoker invoker;
ClassLoader loader;
if (JAVA_FILE_MATCHER.matches(this.binaryPath)) {
loader = new JavaCompilerLoader(Thread.currentThread().getContextClassLoader(), this.getBinaryPath());
invoker = (Invoker) loader;
} else {
if (getEntryClassName() == null) {
throw new IllegalStateException("Main class name is required to execute .jar");
}
loader = new JarLoader(this.getBinaryPath(), getEntryClassName());
invoker = (Invoker) loader;
}
Thread.currentThread().setContextClassLoader(loader);
JsonObject args = getParameter();
if (args == null) {
args = new JsonObject(); //always pass an argument
}
return invoker.invokeMain(args);
}