com.jkristian.cli
Class JavaCommandLine
java.lang.Object
com.jkristian.cli.CommandLine
com.jkristian.cli.JavaCommandLine
public class JavaCommandLine
- extends CommandLine
A named Java class and its parameters (including parameters to the JVM).
- Author:
- John Kristian
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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.
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
-