com.jkristian.cli
Class JavaCommandLine

java.lang.Object
  extended by com.jkristian.cli.CommandLine
      extended by com.jkristian.cli.JavaCommandLine

public class JavaCommandLine
extends CommandLine

A named Java class and its parameters (including parameters to the JVM).

Author:
John Kristian

Field Summary
 
Fields inherited from class com.jkristian.cli.CommandLine
list
 
Constructor Summary
JavaCommandLine(java.lang.String line)
          Construct a command line to execute a Java class, using the current JVM and classpath.
 
Method Summary
 void appendJavaParameter(java.lang.String parameter)
          Add a parameter to the JVM.
 void setClassPath(java.lang.String classPath)
          Change the JVM's -classpath parameter value.
 void setSystemProperty(java.lang.String key, java.lang.String value)
          Add a JVM parameter to set a System property.
 
Methods inherited from class com.jkristian.cli.CommandLine
append, enquote, exec, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaCommandLine

public JavaCommandLine(java.lang.String line)
Construct a command line to execute a Java class, using the current JVM and classpath.

Parameters:
line - a Java class name followed by parameters to that class, separated by whitespace. This is parsed by StringTokenizer(line), so parameters cannot be enquoted or contain whitespace.
Method Detail

appendJavaParameter

public void appendJavaParameter(java.lang.String parameter)
Add a parameter to the JVM.


setSystemProperty

public void setSystemProperty(java.lang.String key,
                              java.lang.String value)
Add a JVM parameter to set a System property.


setClassPath

public void setClassPath(java.lang.String classPath)
Change the JVM's -classpath parameter value.

Parameters:
classPath -