Thursday, August 13, 2009

Process Builder

An operating system process is created by using this class.A collection of process attributes is managed by ProcessBuilder instance.By using those attributes,the start() method creates a new process instance.To create a new subprocess with identical/related attributes the start method can be invoked from the same instance.
These process attributes are managed by each process builder in the following way:
Command: Command consist of a list of strings which makes the external program file to be invoked and its argument,if any significant.The String list representing a valid operating system is System dependent.

Environment:
A mapping which is System dependant varying from variables to values.The copy of the enviornment of the current process is the initial value.

Working Directory:
The current working directory of the current process is the default valueusually the system property,user.dir,imparts the name of the directory

RedirectErrorStream property:

At initial stage the standard output and error output of a subprocess are sent to two separate streams,meaning that this property is false.The false property can be accessed using two of the methods

--Process.getInputStream()

--Process.getErrorStream()

No comments: