Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

oracle.jdeveloper.runner
Class JStarter

java.lang.Object
  extended by oracle.ide.runner.Starter
      extended by oracle.jdeveloper.runner.JStarter

public class JStarter
extends Starter

A class that represents a way of starting a Java process.


Field Summary
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.
 
Fields inherited from class oracle.ide.runner.Starter
process, runProcess, startException
 
Constructor Summary
protected JStarter(JRunProcess jrunProcess, java.lang.String[] target)
          This constructor initializes fields, including jrunProcess, target and runConfiguration.
 
Method Summary
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 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.
 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.
 
Methods inherited from class oracle.ide.runner.Starter
canContainRunProcesses, canStart, canTerminate, canTerminateGracefully, finished, getExitCode, getProcess, getStartDirectory, getStartEnvironmentParams, getStartException, getTerminateCommand, getTerminateEnvironmentParams, isStartOnly, mustPrepareToStart, prepareToStart, reuseLogPage, start, terminate, terminateGracefully, waitForProcess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jrunProcess

protected JRunProcess jrunProcess
The JRunProcess that will be or has been started by this JStarter.


target

protected java.lang.String[] target
The target items for the java command line.


runConfiguration

protected RunConfiguration runConfiguration
The RunConfiguration part of the project.

Constructor Detail

JStarter

protected JStarter(JRunProcess jrunProcess,
                   java.lang.String[] target)
This constructor initializes fields, including jrunProcess, target and runConfiguration.

Method Detail

addJavaOptionProvider

public static void addJavaOptionProvider(JavaOptionProvider javaOptionProvider)
Adds the JavaOptionProvider to the list of JavaOptionProviders that will be called when a Java run process is started.


removeJavaOptionProvider

public static void removeJavaOptionProvider(JavaOptionProvider javaOptionProvider)
Removes the JavaOptionProvider from the list of JavaOptionProviders that will be called when a Java run process is started.


getStartCommand

public java.lang.String[] getStartCommand()
Returns the command line that will be executed to start the process.

Overrides:
getStartCommand in class Starter
Returns:
the command line

addJavaExecutableName

protected boolean addJavaExecutableName(java.util.List list)
Adds the Java executable name to the list of command line items.

Parameters:
list - the command line items so far
Returns:
true if the Java executable name can be determined.

addJavaVmOption

protected boolean addJavaVmOption(java.util.List list)
Adds the Java VM option to the list of command line items.

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.

Parameters:
list - the command line items so far
Returns:
true

getVMName

protected final java.lang.String getVMName()
Return the name of the VM that will be used to start the process


addFirstJavaCommandOptions

protected final void addFirstJavaCommandOptions(java.util.List list)
Prepends the JRunProcess.JAVA_FIRST_COMMAND_OPTIONS to the provided list

Parameters:
list - the command line items so far

addJavaOptions

protected void addJavaOptions(java.util.List list)
Adds the Java options to the list of command line items.

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.

Parameters:
list - the command line items so far

addRunConfigurationJavaOptions

protected void addRunConfigurationJavaOptions(java.util.List list)
Adds the Java options specified in the RunConfiguration to the list of command line items.

Parameters:
list - the command line items so far

addJavaOptionProvidersJavaOptions

protected void addJavaOptionProvidersJavaOptions(java.util.List list)
Adds the Java options from the Java option providers to the list of command line items.

Parameters:
list - the command line items so far

addProxyJavaOptions

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.

Parameters:
list - the command line items so far

addClassPathOption

protected final void addClassPathOption(java.util.List list)

getClassPath

protected java.lang.String getClassPath()
Returns the class path.


addBootClassPathOption

protected final void addBootClassPathOption(java.util.List list)

getBootClassPath

protected java.lang.String getBootClassPath()
Returns the boot class path.


addLastJavaCommandOptions

protected final void addLastJavaCommandOptions(java.util.List list)

addProgramArguments

protected void addProgramArguments(java.util.List list)
Adds the program arguments to the list of command line items.

The implementation here adds program arguments specified in the RunConfiguration and the program arguments from JavaOptionProviders.

Parameters:
list - the command line items so far

addArrayToList

protected static void addArrayToList(java.util.List list,
                                     java.lang.String[] a)

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

Copyright © 1997, 2011, Oracle. All rights reserved.