public class JStarter extends Starter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
JAVA_ARCH_DATA_MODEL |
static java.lang.String |
JAVA_HOME |
static java.lang.String |
JAVA_VERSION |
protected JRunProcess |
jrunProcess
The JRunProcess that will be or has been started by this JStarter.
|
protected RunConfiguration |
runConfiguration
The RunConfiguration part of the project.
|
protected java.lang.String[] |
target
The target items for the java command line.
|
process, runProcess, startException
Modifier | Constructor and Description |
---|---|
protected |
JStarter(JRunProcess jrunProcess,
java.lang.String[] target)
|
Modifier and Type | Method and Description |
---|---|
protected static void |
addArrayToList(java.util.List list,
java.lang.String[] a) |
protected void |
addBootClassPathOption(java.util.List list) |
protected void |
addClassPathOption(java.util.List list) |
protected void |
addEndorsedDirsOption(java.util.List list) |
protected void |
addFirstJavaCommandOptions(java.util.List list)
Prepends the JRunProcess.JAVA_FIRST_COMMAND_OPTIONS to the provided list
|
protected boolean |
addJavaExecutableName(java.util.List list)
Adds the Java executable name to the list of command line items.
|
static void |
addJavaOptionProvider(JavaOptionProvider javaOptionProvider)
Adds the JavaOptionProvider to the list of JavaOptionProviders that
will be called when a Java run process is started.
|
protected void |
addJavaOptionProvidersJavaOptions(java.util.List list)
Adds the Java options from the Java option providers to the list of command
line items.
|
protected void |
addJavaOptions(java.util.List list)
Adds the Java options to the list of command line items.
|
protected boolean |
addJavaVmOption(java.util.List list)
Adds the Java VM option to the list of command line items.
|
protected void |
addLastJavaCommandOptions(java.util.List list) |
protected void |
addProgramArguments(java.util.List list)
Adds the program arguments to the list of command line items.
|
protected void |
addProxyJavaOptions(java.util.List list)
Adds the proxy options to the list of command line, if the
RunConfiguration specifies to pass proxy options to
the process. |
protected void |
addRunConfigurationJavaOptions(java.util.List list)
Adds the Java options specified in the
RunConfiguration to the list of command line items.
|
protected java.lang.String |
getBootClassPath()
Returns the boot class path.
|
protected java.lang.String |
getClassPath()
Returns the class path.
|
protected JRunProcess.CompilationScope |
getCompilationScope() |
protected Element[] |
getExplicitCompilationTargets() |
java.lang.String |
getJdkSystemProperty(java.lang.String key)
Return selected system properties for the JDK that will be used
to start the process.
|
java.lang.String[] |
getStartCommand()
Returns the command line that will be executed to start the process.
|
protected java.lang.String |
getVMName()
Return the name of the VM that will be used to start the process
|
static void |
removeJavaOptionProvider(JavaOptionProvider javaOptionProvider)
Removes the JavaOptionProvider from the list of JavaOptionProviders that
will be called when a Java run process is started.
|
protected void |
setExplicitCompilationTargets(Element[] targets) |
boolean |
start()
Starts the process.
|
canContainRunProcesses, canStart, canTerminate, canTerminateGracefully, finished, getExitCode, getProcess, getStartDirectory, getStartEnvironmentParams, getStartException, getTerminateCommand, getTerminateEnvironmentParams, isStartOnly, mustPrepareToStart, prepareToStart, reuseLogPage, terminate, terminateGracefully, waitForProcess
protected JRunProcess jrunProcess
protected java.lang.String[] target
protected RunConfiguration runConfiguration
public static final java.lang.String JAVA_HOME
public static final java.lang.String JAVA_VERSION
public static final java.lang.String JAVA_ARCH_DATA_MODEL
protected JStarter(JRunProcess jrunProcess, java.lang.String[] target)
public static void addJavaOptionProvider(JavaOptionProvider javaOptionProvider)
public static void removeJavaOptionProvider(JavaOptionProvider javaOptionProvider)
public java.lang.String[] getStartCommand()
getStartCommand
in class Starter
public boolean start()
Starter
After the process is started, it calls the
RunProcess.redirectOutput(java.io.InputStream, java.io.InputStream)
method with
the standard output and error streams and the
RunProcess.redirectInput(java.io.OutputStream)
method with the
standard input stream.
protected boolean addJavaExecutableName(java.util.List list)
list
- the command line items so fartrue
if the Java executable name can be
determined.protected boolean addJavaVmOption(java.util.List list)
The Java VM is specified by the RunConfiguration
The implementation here asks each JavaOptionProviders for the Java VM name. Any of the JavaOptionProviders are allowed to change the VM name and the last one sticks.
list
- the command line items so fartrue
protected final java.lang.String getVMName()
protected final void addFirstJavaCommandOptions(java.util.List list)
list
- the command line items so farprotected void addJavaOptions(java.util.List list)
The implementation here adds the Java options specified in the
RunConfiguration, the Java options from JavaOptionProviders, and
if the RunConfiguration
specifies to pass proxy options to
the process, these are also added.
list
- the command line items so farprotected void addRunConfigurationJavaOptions(java.util.List list)
list
- the command line items so farprotected void addJavaOptionProvidersJavaOptions(java.util.List list)
list
- the command line items so farprotected void addProxyJavaOptions(java.util.List list)
RunConfiguration
specifies to pass proxy options to
the process.list
- the command line items so farprotected final void addClassPathOption(java.util.List list)
protected java.lang.String getClassPath()
protected final void addBootClassPathOption(java.util.List list)
protected final void addEndorsedDirsOption(java.util.List list)
protected java.lang.String getBootClassPath()
protected final void addLastJavaCommandOptions(java.util.List list)
protected void addProgramArguments(java.util.List list)
The implementation here adds program arguments specified in the RunConfiguration and the program arguments from JavaOptionProviders.
list
- the command line items so farprotected static void addArrayToList(java.util.List list, java.lang.String[] a)
protected JRunProcess.CompilationScope getCompilationScope()
protected Element[] getExplicitCompilationTargets()
protected void setExplicitCompilationTargets(Element[] targets)
public java.lang.String getJdkSystemProperty(java.lang.String key)
key
- one of JAVA_HOME, JAVA_VERSION or JAVA_ARCH_DATA_MODEL