Eclipse JDT
2.0

org.eclipse.jdt.launching
Class AbstractVMRunner

java.lang.Object
  |
  +--org.eclipse.jdt.launching.AbstractVMRunner
All Implemented Interfaces:
IVMRunner

public abstract class AbstractVMRunner
extends Object
implements IVMRunner

Abstract implementation of a VM runner.

Clients implementing VM runners should subclass this class.

Since:
2.0
See Also:
IVMRunner

Constructor Summary
AbstractVMRunner()
           
 
Method Summary
protected  void abort(String message, Throwable exception, int code)
          Throws a core exception with an error status object built from the given message, lower level exception, and error code.
protected  Process exec(String[] cmdLine, File workingDirectory)
          Performs a runtime exec on the given command line in the context of the specified working directory, and returns the resulting process.
protected abstract  String getPluginIdentifier()
          Returns the identifier of the plug-in this VM runner originated from.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jdt.launching.IVMRunner
run
 

Constructor Detail

AbstractVMRunner

public AbstractVMRunner()
Method Detail

abort

protected void abort(String message,
                     Throwable exception,
                     int code)
              throws CoreException
Throws a core exception with an error status object built from the given message, lower level exception, and error code.

Parameters:
message - the status message
exception - lower level exception associated with the error, or null if none
code - error code
CoreException

getPluginIdentifier

protected abstract String getPluginIdentifier()
Returns the identifier of the plug-in this VM runner originated from.

Returns:
plug-in identifier

exec

protected Process exec(String[] cmdLine,
                       File workingDirectory)
                throws CoreException
Performs a runtime exec on the given command line in the context of the specified working directory, and returns the resulting process. If the current runtime does not support the specification of a working directory, the status handler for error code ERR_WORKING_DIRECTORY_NOT_SUPPORTED is queried to see if the exec should be re-executed without specifying a working directory.

Parameters:
cmdLine - the command line
workingDirectory - the working directory, or null
Returns:
the resulting process or null if the exec is cancelled
CoreException
See Also:
Runtime

Eclipse JDT
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.