public abstract class Launcher extends Object
Archive
s.Constructor and Description |
---|
Launcher() |
Modifier and Type | Method and Description |
---|---|
protected ClassLoader |
createClassLoader(List<Archive> archives)
Create a classloader for the specified archives.
|
protected ClassLoader |
createClassLoader(URL[] urls)
Create a classloader for the specified URLs
|
protected Runnable |
createMainMethodRunner(String mainClass,
String[] args,
ClassLoader classLoader)
Create the
MainMethodRunner used to launch the application. |
protected abstract List<Archive> |
getClassPathArchives()
Returns the archives that will be used to construct the class path.
|
protected abstract String |
getMainClass()
Returns the main class that should be launched.
|
protected void |
launch(String[] args)
Launch the application.
|
protected void |
launch(String[] args,
String mainClass,
ClassLoader classLoader)
Launch the application given the archive file and a fully configured classloader.
|
protected Logger logger
protected void launch(String[] args)
public static void main(String[] args)
method.args
- the incoming argumentsprotected ClassLoader createClassLoader(List<Archive> archives) throws Exception
archives
- the archivesException
protected ClassLoader createClassLoader(URL[] urls) throws Exception
urls
- the URLsException
protected void launch(String[] args, String mainClass, ClassLoader classLoader) throws Exception
args
- the incoming argumentsmainClass
- the main class to runclassLoader
- the classloaderException
protected Runnable createMainMethodRunner(String mainClass, String[] args, ClassLoader classLoader) throws Exception
MainMethodRunner
used to launch the application.mainClass
- the main classargs
- the incoming argumentsclassLoader
- the classloaderException
protected abstract String getMainClass() throws Exception
Exception
Copyright © 2014. All rights reserved.