ExecutableArchiveLauncher, PropertiesLauncherpublic abstract class Launcher
extends java.lang.Object
Archives.| Modifier and Type | Field | Description |
|---|---|---|
protected java.util.logging.Logger |
logger |
| Constructor | Description |
|---|---|
Launcher() |
| Modifier and Type | Method | Description |
|---|---|---|
protected Archive |
createArchive() |
|
protected java.lang.ClassLoader |
createClassLoader(java.net.URL[] urls) |
Create a classloader for the specified URLs.
|
protected java.lang.ClassLoader |
createClassLoader(java.util.List<Archive> archives) |
Create a classloader for the specified archives.
|
protected java.lang.Runnable |
createMainMethodRunner(java.lang.String mainClass,
java.lang.String[] args,
java.lang.ClassLoader classLoader) |
Create the
MainMethodRunner used to launch the application. |
protected abstract java.util.List<Archive> |
getClassPathArchives() |
Returns the archives that will be used to construct the class path.
|
protected abstract java.lang.String |
getMainClass() |
Returns the main class that should be launched.
|
protected void |
launch(java.lang.String[] args) |
Launch the application.
|
protected void |
launch(java.lang.String[] args,
java.lang.String mainClass,
java.lang.ClassLoader classLoader) |
Launch the application given the archive file and a fully configured classloader.
|
protected void launch(java.lang.String[] args)
public static void main(String[] args) method.args - the incoming argumentsprotected java.lang.ClassLoader createClassLoader(java.util.List<Archive> archives) throws java.lang.Exception
archives - the archivesjava.lang.Exception - if the classloader cannot be createdprotected java.lang.ClassLoader createClassLoader(java.net.URL[] urls)
throws java.lang.Exception
urls - the URLsjava.lang.Exception - if the classloader cannot be createdprotected void launch(java.lang.String[] args,
java.lang.String mainClass,
java.lang.ClassLoader classLoader)
throws java.lang.Exception
args - the incoming argumentsmainClass - the main class to runclassLoader - the classloaderjava.lang.Exception - if the launch failsprotected java.lang.Runnable createMainMethodRunner(java.lang.String mainClass,
java.lang.String[] args,
java.lang.ClassLoader classLoader)
throws java.lang.Exception
MainMethodRunner used to launch the application.mainClass - the main classargs - the incoming argumentsclassLoader - the classloaderjava.lang.Exception - if the main method runner cannot be createdprotected abstract java.lang.String getMainClass()
throws java.lang.Exception
java.lang.Exception - if the main class cannot be obtainedprotected abstract java.util.List<Archive> getClassPathArchives() throws java.lang.Exception
java.lang.Exception - if the class path archives cannot be obtainedprotected final Archive createArchive() throws java.lang.Exception
java.lang.ExceptionCopyright © 2018. All rights reserved.