Package com.logicaldoc.util.exec
Class JavaLauncher
java.lang.Object
com.logicaldoc.util.exec.JavaLauncher
JavaLauncher Provides an easy way to launch java applications.
- 
Constructor Details- 
JavaLauncherpublic JavaLauncher()
 
- 
- 
Method Details- 
execpublic static Process exec(String mainClass, String classpath, String[] jvmargs, String[] properties) throws ExecException Launch a java program.- Parameters:
- mainClass- - class with main method
- classpath- - the java classpath
- jvmargs- - arguments for the jvm
- properties- - any system properties
- Returns:
- the launched process
- Throws:
- ExecException- Error in executing the given command
 
- 
execJarExecute a java jar file that contains a manifest.- Parameters:
- pathToJar- - absolute path to your jar
- jvmargs- - arguments for the java virtual machine
- Returns:
- Process The launched process
- Throws:
- ExecException- An error happened during execution
 
- 
findJVMFind a suitable JVM on the user's system.- Returns:
- - path to java binary
 
- 
mainDemo - Launch a java program.- Parameters:
- args- the invocation arguments
 
 
-