public class VMRunnerConfiguration
extends java.lang.Object
Clients may instantiate this class; it is not intended to be subclassed.
Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.Constructor and Description |
---|
VMRunnerConfiguration(java.lang.String classToLaunch,
java.lang.String[] classPath)
Creates a new configuration for launching a VM to run the given main class
using the given class path.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getBootClassPath()
Returns the boot includepath.
|
java.lang.String[] |
getClassPath()
Returns the includepath.
|
java.lang.String |
getClassToLaunch()
Returns the name of the class to launch.
|
java.lang.String[] |
getEnvironment()
Returns the environment for the JavaScript program or
null |
java.lang.String[] |
getProgramArguments()
Returns the arguments to the JavaScript program.
|
java.lang.String[] |
getVMArguments()
Returns the arguments to the VM itself.
|
java.util.Map |
getVMSpecificAttributesMap()
Returns the
Map that contains String name/value pairs that represent
VM-specific attributes. |
java.lang.String |
getWorkingDirectory()
Returns the working directory of a launched VM.
|
boolean |
isResumeOnStartup()
Returns whether the VM is resumed on startup when launched
in debug mode.
|
void |
setBootClassPath(java.lang.String[] bootClassPath)
Sets the boot includepath.
|
void |
setEnvironment(java.lang.String[] environment)
Sets the environment for the JavaScript program.
|
void |
setProgramArguments(java.lang.String[] args)
Sets the custom program arguments.
|
void |
setResumeOnStartup(boolean resume)
Sets whether the VM is resumed on startup when launched in
debug mode.
|
void |
setVMArguments(java.lang.String[] args)
Sets the custom VM arguments.
|
void |
setVMSpecificAttributesMap(java.util.Map map)
Sets the
Map that contains String name/value pairs that represent
VM-specific attributes. |
void |
setWorkingDirectory(java.lang.String path)
Sets the working directory for a launched VM.
|
public VMRunnerConfiguration(java.lang.String classToLaunch, java.lang.String[] classPath)
classToLaunch
- The fully qualified name of the class to launch. May not be null.classPath
- The includepath. May not be null.public void setVMSpecificAttributesMap(java.util.Map map)
Map
that contains String name/value pairs that represent
VM-specific attributes.map
- the Map
of VM-specific attributes.public void setVMArguments(java.lang.String[] args)
args
- the list of VM argumentspublic void setProgramArguments(java.lang.String[] args)
args
- the list of argumentspublic void setEnvironment(java.lang.String[] environment)
environment
- the environment for the JavaScript program specified as an array
of strings, each element specifying an environment variable setting in the
format name=valuepublic void setBootClassPath(java.lang.String[] bootClassPath)
In release 3.0, support has been added for appending and prepending the
boot includepath. Generally an IVMRunner
should use the prepend,
main, and append boot includepaths provided. However, in the case that an
IVMRunner
does not support these options, a complete bootpath
should also be specified.
bootClassPath
- The boot includepath. An empty array indicates an empty
bootpath and null
indicates a default bootpath.public java.util.Map getVMSpecificAttributesMap()
Map
that contains String name/value pairs that represent
VM-specific attributes.Map
of VM-specific attributes or null
.public java.lang.String getClassToLaunch()
null
.public java.lang.String[] getClassPath()
public java.lang.String[] getBootClassPath()
null
indicates a default bootpath.
In 3.0, support has been added for prepending and appending to the
boot includepath. The new attributes are stored in the VM specific
attributes map using the following keys defined in
IJavaLaunchConfigurationConstants
:
null
indicates a default bootpath.setBootClassPath(String[])
,
IJavaLaunchConfigurationConstants
public java.lang.String[] getVMArguments()
null
.setVMArguments(String[])
public java.lang.String[] getProgramArguments()
null
.setProgramArguments(String[])
public java.lang.String[] getEnvironment()
null
null
public void setWorkingDirectory(java.lang.String path)
path
- the absolute path to the working directory
to be used by a launched VM, or null
if
the default working directory is to be inherited from the
current processpublic java.lang.String getWorkingDirectory()
null
if the working
directory is inherited from the current processpublic void setResumeOnStartup(boolean resume)
resume
- whether to resume the VM on startuppublic boolean isResumeOnStartup()
true
for backwards compatibility.Copyright (c) IBM Corp. and others 2000, 2010. All Rights Reserved.