Class next.util.ProcessInfo

CLASS DESCRIPTION

Extends:
next.util.NextObject

The ProcessInfo class provides methods to access process-wide information. A ProcessInfo object can return the arguments passed to the process. It can also be used to specify the arguments to a process, or to specify command-line arguments.

The processInfo static method returns a shared ProcessInfo object for the process, which can then be messaged to set or obtain argument information.


CONSTRUCTORS

ProcessInfo

public ProcessInfo()

Returns a newly-allocated and initialized ProcessInfo object.


METHODS

arguments

public next.util.ImmutableVector arguments()

Returns the command line arguments as an array of strings.


processInfo

public static next.util.ProcessInfo processInfo()

Returns an initialized ProcessInfo object for the process. A ProcessInfo object is created the first time this method is invoked, and that same object is returned on each subsequent invocation.


setArguments

public void setArguments(next.util.ImmutableVector args)

Sets the process's arguments to the contents of the args array.


setCommandLineArguments

public static void setCommandLineArguments(java.lang.String[] args)

Sets the process's first argument to "java", and sets the remaining arguments to the contents of the args array.

This method is particularly useful for WebObjects applications, since WebObjects obtains its arguments from the process information instead of providing it's own methods.