public class JavaLauncher extends Object
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
log |
Constructor and Description |
---|
JavaLauncher() |
Modifier and Type | Method and Description |
---|---|
static Process |
exec(String mainClass,
String classpath,
String[] jvmargs,
String[] properties)
Launch a java program.
|
static Process |
execJar(String pathToJar,
String[] jvmargs)
Execute a java jar file that contains a manifest.
|
static String |
findJVM()
Find a suitable JVM on the user's system.
|
static void |
main(String[] args)
Demo - Launch a java program.
|
public static Process exec(String mainClass, String classpath, String[] jvmargs, String[] properties) throws Exception
mainClass
- - class with main methodclasspath
- - the java classpathjvmargs
- - arguments for the jvmproperties
- - any system propertiesException
public static Process execJar(String pathToJar, String[] jvmargs) throws Exception
pathToJar
- - absolute path to your jarjvmargs
- - arguments for the java virtual machineException
public static String findJVM()
public static void main(String[] args)
args
- Copyright © 2008-2014 Logical Objects. All Rights Reserved.