Process

Name

Process

Synopsis

Description

The Process class describes processes that are started by the exec() method in the Runtime class. A Process object controls a process and gets information about it.

The Process class is an abstract class; therefore, it cannot be instantiated. The actual Process objects created by the exec() method belong to operating-system-specific subclasses of Process that implement the Process methods in platform-dependent ways.

Note that losing all references to a Process object, thereby making it garbage collectable, does not result in the underlying Process object dying. It merely means that there is no longer a Java object to control the process. The process itself continues to run asynchronously. In addition, no guarantees are made as to whether a controlled process will be able to continue after its parent process dies.

Class Summary

public abstract class java.lang.Process extends java.lang.Object {
 // Constructors public Process(); // Instance Methods public abstract void destroy();
public abstract int exitValue();
public abstract InputStream getErrorStream();
public abstract InputStream getInputStream();
public abstract OutputStream getOutputStream();
public abstract int waitFor();
}

Constructors

Process

public Process()

Instance Methods

destroy

abstract public void destroy()

exitValue

abstract public int exitValue()

getErrorStream

abstract public InputStream getErrorStream()

getInputStream

abstract public InputStream getInputStream()

getOutputStream

abstract public OutputStream getOutputStream()

waitFor

abstract public int waitFor()

Inherited Methods

Method Inherited From Method Inherited From
clone() Object equals(Object) Object
finalize() Object getClass() Object
hashCode() Object notify() Object
notifyAll() Object toString() Object
wait() Object wait(long) Object
wait(long, int) Object

See Also

Exceptions; Object; Runtime