public class DefaultJavaRunner extends Object implements StoppableJavaRunner, ProcessProvider
| Constructor and Description |
|---|
DefaultJavaRunner()
Constructor.
|
DefaultJavaRunner(boolean wait)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
exec(String[] vmOptions,
String[] classpath,
String mainClass,
String[] programOptions,
String javaHome,
File workingDirectory)
Starts the selected Java program, up to service implementation whether it waits for it to exit.
|
void |
exec(String[] vmOptions,
String[] classpath,
String mainClass,
String[] programOptions,
String javaHome,
File workingDirectory,
String[] envOptions)
Starts the selected Java program, up to service implementation whether it waits for it to exit.
|
Process |
getProcess() |
void |
shutdown()
Stops the started java platform.
|
void |
waitForExit()
Wait till the framework process exits.
|
public DefaultJavaRunner()
public DefaultJavaRunner(boolean wait)
wait - should wait for framework exispublic void exec(String[] vmOptions, String[] classpath, String mainClass, String[] programOptions, String javaHome, File workingDirectory) throws ExecutionException
JavaRunnerexec in interface JavaRunnervmOptions - selected JVM optionsclasspath - application class pathmainClass - main program entry pointprogramOptions - program specific optionsjavaHome - java home directoryworkingDirectory - working directoryExecutionException - if something goes wrongpublic void exec(String[] vmOptions, String[] classpath, String mainClass, String[] programOptions, String javaHome, File workingDirectory, String[] envOptions) throws ExecutionException
exec in interface JavaRunnervmOptions - selected JVM optionsclasspath - application class pathmainClass - main program entry pointprogramOptions - program specific optionsjavaHome - java home directoryworkingDirectory - working directoryenvOptions - optional environment variablesExecutionException - if something goes wrongpublic void shutdown()
shutdown in interface StoppableJavaRunnerpublic void waitForExit()
public Process getProcess()
getProcess in interface ProcessProviderCopyright © 2006–2019 OPS4J - Open Participation Software for Java. All rights reserved.