I have a list of jars that contains jar with needed main-class. I try to run it main class:
public static void runCommandlineMain(String classPathFile, String args[]) throws Exception{
URL[] urls = getJarUrls(classPathFile);
URLClassLoader classLoader = new URLClassLoader(urls);
Class<?> clazz = classLoader.loadClass("liquibase.commandline.Main");
Method main = clazz.getMethod("main", String[].class);
main.invoke(null, new Object[]{args});
}
But after run I've follow:
Process finished with exit code -1
and nothing more. How can i resolve it? And how to get console out put from this class?