public interface ProcessBuilder
| 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.
|
ProcessBuilder directory(File dir)
dir - The directory to run the command from.ProcessBuilder instance.ProcessBuilder command(String command)
command - The command to execute.ProcessBuilder instance.Process start() throws IOException
IOException - If the process can not be created.Process attach(int pid) throws IOException
pid - The process PID to attach.IOException - if the process can not be attached to.Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.