public abstract class ApplicationUtils extends Object
Modifier and Type | Field and Description |
---|---|
static int |
EXCEPTION_WHEN_ADDING_MANAGEMENT
System.exit() value for the case where the management registration for the application could not be started.
|
static int |
EXCEPTION_WHEN_ADDING_SHUTDOWN_HOOK
System.exit() value for the case where the Shutdown Hook for the application could not be added.
|
static int |
EXCEPTION_WHILE_INSTANTIATING
System.exit() value for the case where the application class could not be instantiated.
|
static int |
NO_FACTORY_METHOD
System.exit() value for the case where the application does not have a factory method.
|
static int |
WRONG_ARGUMENTS
System.exit() value for the case where wrong arguments are given.
|
Constructor and Description |
---|
ApplicationUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
dirMustExist(File dir)
Ensure that a directory is available and writable.
|
static void |
startApp(Class c,
String[] args)
Starts up an application.
|
static void |
startApp(LifeCycleComponent component)
Starts up an LifeCycleComponent.
|
public static final int WRONG_ARGUMENTS
public static final int NO_FACTORY_METHOD
public static final int EXCEPTION_WHILE_INSTANTIATING
public static final int EXCEPTION_WHEN_ADDING_SHUTDOWN_HOOK
public static final int EXCEPTION_WHEN_ADDING_MANAGEMENT
public ApplicationUtils()
public static void startApp(Class c, String[] args)
c
- The class to be started.args
- The arguments to the application (should be empty).public static void startApp(LifeCycleComponent component)
component
- The component to start.public static void dirMustExist(File dir)
dir
- A File object denoting a directory.PermissionDenied
- if the directory doesn't exist and cannot be created/written to, or if the File object
indicates an existing non-directory.Copyright © 2005–2016 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.