java.lang.Object
de.iip_ecosphere.platform.services.spring.loader.AppStarter

public class AppStarter extends Object
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
  • Field Details

  • Constructor Details

    • AppStarter

      public AppStarter()
  • Method Details

    • setMainClass

      public static void setMainClass(String cls)
      Re-defines the qualified name of the main class.
      Parameters:
      cls - the qualified name of the main class
    • createClassloader

      public static ClassLoader createClassloader(File jarFile) throws Exception
      Creates a classloader for jarFile.
      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

      public static void main(String[] args) throws Exception
      Executes the application by getting the class loading right and by calling the corresponding main method of mainClass.
      Parameters:
      args - command line arguments
      Throws:
      Exception - if any exception occurred during startup
    • readLines

      static List<String> readLines(InputStream in)
      Reads the given input streams as lines.
      Parameters:
      in - the input stream
      Returns:
      the lines