com.isti.util
Class DupJarLauncher

java.lang.Object
  extended by com.isti.util.DupJarLauncher

public class DupJarLauncher
extends java.lang.Object

Class DupJarLauncher is a launcher for a "secondary" program to be run out of a jar duplicated from an original jar.


Method Summary
static java.lang.String launch(java.lang.String origJarFNameStr, java.lang.String dupJarFNameStr, java.lang.String progClassNameStr, java.lang.String progSingletonNameStr, java.lang.String jvmParamsStr, java.lang.String progParamsStr, LogFile logObj)
          Launches the specified program out of a jar duplicated from an original jar.
static java.lang.String launch(java.lang.String origJarFNameStr, java.lang.String dupJarFNameStr, java.lang.String progClassNameStr, java.lang.String progSingletonNameStr, java.lang.String jvmParamsStr, java.lang.String progParamsStr, LogFile logObj, java.lang.String progSingletonDirStr)
          Launches the specified program out of a jar duplicated from an original jar.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

launch

public static java.lang.String launch(java.lang.String origJarFNameStr,
                                      java.lang.String dupJarFNameStr,
                                      java.lang.String progClassNameStr,
                                      java.lang.String progSingletonNameStr,
                                      java.lang.String jvmParamsStr,
                                      java.lang.String progParamsStr,
                                      LogFile logObj,
                                      java.lang.String progSingletonDirStr)
Launches the specified program out of a jar duplicated from an original jar. If the duplicate jar does not exist or is older than the original jar then the original jar is copied over. The program will be run via a system-exec of the following command: java jvmParamsStr -cp dupJarFNameStr progParamsStr

Parameters:
origJarFNameStr - name or original jar file.
dupJarFNameStr - name or duplicate jar file.
progClassNameStr - name of program class containing 'main' method to be run.
progSingletonNameStr - name associated with program-singleton file to be check to see if program is already running, or null for none.
jvmParamsStr - JVM parameters for 'java' command, or null for none.
progParamsStr - program parameters for 'java' command, or null for none.
logObj - log file to use, or null for none.
progSingletonDirStr - directory for program-singleton file, or null or empty string for default directory.
Returns:
null if successful; an error message if not.

launch

public static java.lang.String launch(java.lang.String origJarFNameStr,
                                      java.lang.String dupJarFNameStr,
                                      java.lang.String progClassNameStr,
                                      java.lang.String progSingletonNameStr,
                                      java.lang.String jvmParamsStr,
                                      java.lang.String progParamsStr,
                                      LogFile logObj)
Launches the specified program out of a jar duplicated from an original jar. If the duplicate jar does not exist or is older than the original jar then the original jar is copied over. The program will be run via a system-exec of the following command: java jvmParamsStr -cp dupJarFNameStr progParamsStr

Parameters:
origJarFNameStr - name or original jar file.
dupJarFNameStr - name or duplicate jar file.
progClassNameStr - name of program class containing 'main' method to be run.
progSingletonNameStr - name associated with program-singleton file to be check to see if program is already running, or null for none.
jvmParamsStr - JVM parameters for 'java' command, or null for none.
progParamsStr - program parameters for 'java' command, or null for none.
logObj - log file to use, or null for none.
Returns:
null if successful; an error message if not.