Class AppStarter
java.lang.Object
de.iip_ecosphere.platform.services.spring.loader.AppStarter
Frontend class for the actual generated application start class to get the class loading context right. This class
shall have no dependencies into oktoflow to keep the initial class loader clean.
- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn accessible Jar Launcher if we need an (usual) root classloader.static classImplements an accessible launcher just to access the Spring packaged JARs in the way Spring is doing it.(package private) static classA delegating child-first classloader.(package private) static classA delegating child-first classloader.(package private) static classA delegating child classloader to make internal methods accessible.(package private) static final classA class path index file that provides ordering information for JARs.(package private) static classCreates an indexed child-firstclass loader taking into account the first given URL as it contains directly stored classes/resources. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ClassLoadercreateClassloader(File jarFile) Creates a classloader forjarFile.static voidExecutes the application by getting the class loading right and by calling the corresponding main method ofmainClass.readLines(InputStream in) Reads the given input streams as lines.static voidsetMainClass(String cls) Re-defines the qualified name of the main class.
-
Field Details
-
PROPERTY_MAIN_CLASS
- See Also:
-
APP_CLASSPATH_INDEX_LOCATION
- See Also:
-
APP_CLASSPATH
- See Also:
-
mainClass
-
-
Constructor Details
-
AppStarter
public AppStarter()
-
-
Method Details
-
setMainClass
Re-defines the qualified name of the main class.- Parameters:
cls- the qualified name of the main class
-
createClassloader
Creates a classloader forjarFile.- Parameters:
jarFile- the jar file to create a class loader for- Returns:
- the class loader (single or isolating)
- Throws:
Exception- if loading the archive/creating the class loader fails
-
main
Executes the application by getting the class loading right and by calling the corresponding main method ofmainClass.- Parameters:
args- command line arguments- Throws:
Exception- if any exception occurred during startup
-
readLines
Reads the given input streams as lines.- Parameters:
in- the input stream- Returns:
- the lines
-