java.io.Serializablepublic final class NbProcessDescriptor
extends java.lang.Object
implements java.io.Serializable
This allows to define arguments in format -user {USER_NAME} -do {ACTION} and then use MapFormat with defined values for USER_NAME and ACTION that will be substitued by into the arguments.
| Constructor | Description |
|---|---|
NbProcessDescriptor(java.lang.String processName,
java.lang.String arguments) |
Create a new descriptor for the specified process, classpath switch, and classpath.
|
NbProcessDescriptor(java.lang.String processName,
java.lang.String arguments,
java.lang.String info) |
Create a new descriptor for the specified process, classpath switch, and classpath.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(java.lang.Object o) |
|
java.lang.Process |
exec() |
Executes the process with arguments provided in constructor.
|
java.lang.Process |
exec(java.text.Format format) |
Executes the process with arguments and processName formatted by the provided
format.
|
java.lang.Process |
exec(java.text.Format format,
java.lang.String[] envp) |
Executes the process with arguments and processNme formatted by the provided
format.
|
java.lang.Process |
exec(java.text.Format format,
java.lang.String[] envp,
boolean appendEnv,
java.io.File cwd) |
Executes the process with arguments, processName and envp formatted by the provided
format.
|
java.lang.Process |
exec(java.text.Format format,
java.lang.String[] envp,
java.io.File cwd) |
Executes the process with arguments formatted by the provided
format.
|
java.lang.String |
getArguments() |
Getter the execution arguments of the process.
|
java.lang.String |
getInfo() |
Getter for the human readable info about the arguments.
|
java.lang.String |
getProcessName() |
Get the name of the executable to run.
|
int |
hashCode() |
public NbProcessDescriptor(java.lang.String processName,
java.lang.String arguments)
processName - the name of the executable to runarguments - string for formating of arguments (may be quoted)public NbProcessDescriptor(java.lang.String processName,
java.lang.String arguments,
java.lang.String info)
processName - the name of the executable to runarguments - string for formating of arguments (may be quoted)info - info how to format the arguments (human-readable string)public java.lang.String getProcessName()
public java.lang.String getArguments()
public java.lang.String getInfo()
public java.lang.Process exec(java.text.Format format,
java.lang.String[] envp,
java.io.File cwd)
throws java.io.IOException
format - format to be applied to arguments, process and envp supplied by user. It can be null if no formatting should be done.envp - list of properties to be applied to the process, or null to leave unspecifiedcwd - the working directory to use, or null if this should not be specifiedjava.io.IOException - if the start of the process fails, or if setting the working directory is not supportedpublic java.lang.Process exec(java.text.Format format,
java.lang.String[] envp,
boolean appendEnv,
java.io.File cwd)
throws java.io.IOException
format - format to be applied to arguments, process and envp supplied by user. It can be null if no formatting should be done.envp - list of properties to be applied to the process, or null to leave unspecifiedappendEnv - if true and envp is not null, append or replace JVM's environmentcwd - the working directory to use, or null if this should not be specifiedjava.io.IOException - if the start of the process fails, or if setting the working directory is not supportedpublic java.lang.Process exec(java.text.Format format,
java.lang.String[] envp)
throws java.io.IOException
format - format to be aplied to arguments, process and envp suplied by user. It can be null if no formatting should be done.envp - list of properties to be applied to the process, or null to leave unspecifiedjava.io.IOException - if the start of the process failspublic java.lang.Process exec(java.text.Format format)
throws java.io.IOException
format - format to be aplied to arguments and process. It can be null if no formatting should be done.java.io.IOException - if the start of the process failspublic java.lang.Process exec()
throws java.io.IOException
java.io.IOException - if the start of the process failspublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.ObjectBuilt on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.