org.ow2.jasmine.jadort.service.action.launchers
Class JavaLauncher
java.lang.Object
org.ow2.jasmine.jadort.service.action.launchers.JavaLauncher
public class JavaLauncher
- extends java.lang.Object
Launches a Java program.
JaDOrT needs this class since some IIOP implementations (WebLogic's private
IIOPS, T3 implementations but also WebSphere's private IIOP implementation)
seem not to interoperate well with JOnAS' IIOP implementation.
- Author:
- Malek Chahine, Remy Bresson, S. Ali Tokmen
|
Method Summary |
static java.lang.String |
exec(java.lang.String mainClass,
java.io.File[] classpath,
java.lang.String[] jvmargs,
java.lang.String[] lines,
long timeout)
Launch a java program. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JavaLauncher
public JavaLauncher()
exec
public static java.lang.String exec(java.lang.String mainClass,
java.io.File[] classpath,
java.lang.String[] jvmargs,
java.lang.String[] lines,
long timeout)
throws java.io.IOException,
java.lang.InterruptedException
- Launch a java program.
- Parameters:
mainClass - Java class with main methodclasspath - Files in Classpath, cannot be nulljvmargs - VM arguments, may be nulllines - Lines to pass to the program, may be nulltimeout - Number of milliseconds the program is allowed to run
- Returns:
- Whatever the program has output into the stdio
- Throws:
java.io.IOException - If any I/O exception occurs when launching or reading
response from program
java.lang.InterruptedException - If waiting for process termination fails
Copyright © 2010 OW2 Consortium. All Rights Reserved.