ExecutableArchiveLauncher, PropertiesLauncherpublic abstract class Launcher extends Object
Archives.| Constructor | Description |
|---|---|
Launcher() |
| Modifier and Type | Method | Description |
|---|---|---|
protected Archive |
createArchive() |
|
protected ClassLoader |
createClassLoader(URL[] urls) |
Create a classloader for the specified URLs.
|
protected ClassLoader |
createClassLoader(List<Archive> archives) |
Create a classloader for the specified archives.
|
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 - if the classloader cannot be createdprotected ClassLoader createClassLoader(URL[] urls) throws Exception
urls - the URLsException - if the classloader cannot be createdprotected void launch(String[] args, String mainClass, ClassLoader classLoader) throws Exception
args - the incoming argumentsmainClass - the main class to runclassLoader - the classloaderException - if the launch failsprotected 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 - if the main method runner cannot be createdprotected abstract String getMainClass() throws Exception
Exception - if the main class cannot be obtainedprotected abstract List<Archive> getClassPathArchives() throws Exception
Exception - if the class path archives cannot be obtainedCopyright © 2018. All rights reserved.