public class StandardVMDebugger extends StandardVMRunner
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
BIN
Bin path segment descriptor
String equals the word:
bin |
protected static java.lang.String |
JAVA_JVM_VERSION |
protected static java.lang.String |
JRE
JRE path segment descriptor
String equals the word:
jre |
fVMInstance, XSTART_ON_FIRST_THREAD| Constructor and Description |
|---|
StandardVMDebugger(IVMInstall vmInstance)
Creates a new launcher
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkErrorMessage(IProcess process)
Checks and forwards an error from the specified process
|
protected IDebugTarget |
createDebugTarget(VMRunnerConfiguration config,
ILaunch launch,
int port,
IProcess process,
VirtualMachine vm)
Creates a new debug target for the given virtual machine and system process
that is connected on the specified port for the given launch.
|
protected ListeningConnector |
getConnector()
Returns the default 'com.sun.jdi.SocketListen' connector
|
protected java.lang.String[] |
prependJREPath(java.lang.String[] env,
IPath jdkpath)
This method performs platform specific operations to modify the runtime path for JREs prior to launching.
|
void |
run(VMRunnerConfiguration config,
ILaunch launch,
IProgressMonitor monitor)
Launches a Java VM as specified in the given configuration,
contributing results (debug targets and processes), to the
given launch.
|
protected void |
specifyArguments(java.util.Map<java.lang.String,Connector.Argument> map,
int portNumber)
Allows arguments to be specified
|
addArguments, addBootClassPathArguments, constructProgramString, convertClassPath, ensureEncoding, fileExists, getPluginIdentifier, getWorkingDir, prependJREPath, renderCommandLine, renderDebugTarget, renderProcessLabel, validateCommandLineabort, combineVmArgs, exec, exec, getCmdLineAsString, getDefaultProcessMap, isModular, newProcessprotected static final java.lang.String JAVA_JVM_VERSION
protected static final java.lang.String JRE
jreprotected static final java.lang.String BIN
binpublic StandardVMDebugger(IVMInstall vmInstance)
vmInstance - the backing IVMInstall to launchpublic void run(VMRunnerConfiguration config, ILaunch launch, IProgressMonitor monitor) throws CoreException
IVMRunnerrun in interface IVMRunnerrun in class StandardVMRunnerconfig - the configuration settings for this runlaunch - the launch to contribute tomonitor - progress monitor or null A cancelable progress monitor is provided by the Job
framework. It should be noted that the setCanceled(boolean) method should never be called on the provided
monitor or the monitor passed to any delegates from this method; due to a limitation in the progress monitor
framework using the setCanceled method can cause entire workspace batch jobs to be canceled, as the canceled flag
is propagated up the top-level parent monitor. The provided monitor is not guaranteed to have been started.CoreException - if an exception occurs while launchingprotected java.lang.String[] prependJREPath(java.lang.String[] env,
IPath jdkpath)
For Windows:
Prepends the location of the JRE bin directory for the given JDK path to the PATH variable in Windows.
This method assumes that the JRE is located within the JDK install directory
in: where the JRE itself would be located
in: where the JDK itself is located
For Mac OS: Searches for and sets the correct state of the JAVA_VM_VERSION environment variable to ensure it matches the currently chosen VM of the launch config
env - the current array of environment variables to run withjdkpath - the path to the executable (javaw).protected IDebugTarget createDebugTarget(VMRunnerConfiguration config, ILaunch launch, int port, IProcess process, VirtualMachine vm)
config - run configuration used to launch the VMlaunch - launch to add the target toport - port the VM is connected toprocess - associated system processvm - JDI virtual machineIDebugTargetprotected void checkErrorMessage(IProcess process)
throws CoreException
process - the process to get the error message fromCoreException - if a problem occursprotected void specifyArguments(java.util.Map<java.lang.String,Connector.Argument> map,
int portNumber)
map - argument mapportNumber - the port numberprotected ListeningConnector getConnector()
ListeningConnector