public class ProcessBuilderImpl extends Object implements ProcessBuilder
| Constructor and Description |
|---|
ProcessBuilderImpl() |
| Modifier and Type | Method and Description |
|---|---|
Process |
attach(int pid)
Attach to an existing process.
|
ProcessBuilder |
command(String command)
Set the command to execute.
|
ProcessBuilder |
directory(File dir)
Specify the current directory to run the command from.
|
Process |
start()
Create and start the process.
|
public ProcessBuilder directory(File dir)
ProcessBuilderdirectory in interface ProcessBuilderdir - The directory to run the command from.ProcessBuilder instance.public ProcessBuilder command(String command)
ProcessBuildercommand in interface ProcessBuildercommand - The command to execute.ProcessBuilder instance.public Process start() throws IOException
ProcessBuilderstart in interface ProcessBuilderIOException - If the process can not be created.public Process attach(int pid) throws IOException
ProcessBuilderattach in interface ProcessBuilderpid - The process PID to attach.IOException - if the process can not be attached to.Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.