Package com.bc.ceres.launcher
Class Launcher
- java.lang.Object
-
- com.bc.ceres.launcher.Launcher
-
public final class Launcher extends Object
A launcher for applications based on the Ceres runtime.- See Also:
RuntimeConfig
,ClasspathFactory
-
-
Constructor Summary
Constructors Constructor Description Launcher(RuntimeConfig runtimeConfig, ClasspathFactory classpathFactory)
Constructs a new launcher.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassLoader
createClassLoader()
static Launcher
createDefaultLauncher()
Creates a default launcher.ClasspathFactory
getClasspathFactory()
RuntimeConfig
getRuntimeConfig()
void
launch(String[] args)
static void
main(String[] args)
Launches the application with a defaultRuntimeConfig
and aClasspathFactory
based on the${ceres.context}.mainClass
property.
-
-
-
Constructor Detail
-
Launcher
public Launcher(RuntimeConfig runtimeConfig, ClasspathFactory classpathFactory)
Constructs a new launcher.- Parameters:
runtimeConfig
- the runtime configurationclasspathFactory
- the classpath factory
-
-
Method Detail
-
main
public static void main(String[] args)
Launches the application with a defaultRuntimeConfig
and aClasspathFactory
based on the${ceres.context}.mainClass
property. If the main class is"com.bc.ceres.core.runtime.RuntimeLauncher"
, then a minimal classpath which at least includes theceres-core
library is used. Otherwise all directories, JARs and ZIPs found in the home directory will be added to the classpath.- Parameters:
args
- the command-line arguments
-
createDefaultLauncher
public static Launcher createDefaultLauncher() throws RuntimeConfigException
Creates a default launcher.- Returns:
- a default launcher.
- Throws:
RuntimeConfigException
- if the default configuration is invalid
-
getRuntimeConfig
public RuntimeConfig getRuntimeConfig()
-
getClasspathFactory
public ClasspathFactory getClasspathFactory()
-
createClassLoader
public ClassLoader createClassLoader() throws RuntimeConfigException
- Throws:
RuntimeConfigException
-
-