public class ApplicationLauncher extends Object
The following example shows how to start an application without any arguments:
ApplicationLauncher.application(JavaApp.class).start(); // or ApplicationLauncher.application("org.fest.swing.application.JavaApp").start();
The following example shows how to start an application with arguments:
ApplicationLauncher.application(JavaApp.class).withArgs("arg1", "arg2").start(); // or ApplicationLauncher.application("org.fest.swing.application.JavaApp").withArgs("arg1", "arg2").start();
| Modifier and Type | Method and Description |
|---|---|
static ApplicationLauncher |
application(Class<?> applicationType)
Starting point of the fluent interface.
|
static ApplicationLauncher |
application(String applicationTypeName)
Starting point of the fluent interface.
|
void |
start()
Starts the application.
|
ApplicationLauncher |
withArgs(String... newArgs)
Specifies the arguments to pass to the "main" method.
|
public static ApplicationLauncher application(String applicationTypeName)
applicationTypeName - the fully qualified name of the class containing the "main" method.ApplicationStarter.UnexpectedException - if the class specified in the given name cannot be loaded.public static ApplicationLauncher application(Class<?> applicationType)
applicationType - the class containing the "main" method.ApplicationStarter.public ApplicationLauncher withArgs(String... newArgs)
newArgs - the arguments to pass to the "main" method.ApplicationStarter.NullPointerException - if newArgs is null.public void start()
org.fest.reflect.exception.ReflectionError - if the "main" method cannot be invoked.Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.