org.ops4j.exec
Class DefaultJavaRunner

java.lang.Object
  extended by org.ops4j.exec.DefaultJavaRunner
All Implemented Interfaces:
JavaRunner, StoppableJavaRunner

public class DefaultJavaRunner
extends Object
implements StoppableJavaRunner

Default Java Runner.

Since:
0.6.1, December 09, 2008
Author:
Alin Dreghiciu (adreghiciu@gmail.com), Harald Wellmann

Constructor Summary
DefaultJavaRunner()
          Constructor.
DefaultJavaRunner(boolean wait)
          Constructor.
 
Method Summary
 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.
 void shutdown()
          Stops the started java platform.
 void waitForExit()
          Wait till the framework process exits.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultJavaRunner

public DefaultJavaRunner()
Constructor.


DefaultJavaRunner

public DefaultJavaRunner(boolean wait)
Constructor.

Parameters:
wait - should wait for framework exis
Method Detail

exec

public void exec(String[] vmOptions,
                 String[] classpath,
                 String mainClass,
                 String[] programOptions,
                 String javaHome,
                 File workingDirectory)
          throws ExecutionException
Description copied from interface: JavaRunner
Starts the selected Java program, up to service implementation whether it waits for it to exit.

Specified by:
exec in interface JavaRunner
Parameters:
vmOptions - selected JVM options
classpath - application class path
mainClass - main program entry point
programOptions - program specific options
javaHome - java home directory
workingDirectory - working directory
Throws:
ExecutionException

exec

public void exec(String[] vmOptions,
                 String[] classpath,
                 String mainClass,
                 String[] programOptions,
                 String javaHome,
                 File workingDirectory,
                 String[] envOptions)
          throws ExecutionException
Starts the selected Java program, up to service implementation whether it waits for it to exit.

Specified by:
exec in interface JavaRunner
Parameters:
vmOptions - selected JVM options
classpath - application class path
mainClass - main program entry point
programOptions - program specific options
javaHome - java home directory
workingDirectory - working directory
envOptions - optional environment variables
Throws:
ExecutionException

shutdown

public void shutdown()
Stops the started java platform.

Specified by:
shutdown in interface StoppableJavaRunner

waitForExit

public void waitForExit()
Wait till the framework process exits.



Copyright © 2006-2013 OPS4J - Open Participation Software for Java. All Rights Reserved.