public final class ProcessBuilders extends Object
ProcessBuilder
.Modifier and Type | Method and Description |
---|---|
static String |
toCommandLine(ProcessBuilder processBuilder,
boolean prependWorkingDirectory)
Returns a command to launch
processBuilder via command line. |
public static String toCommandLine(ProcessBuilder processBuilder, boolean prependWorkingDirectory)
processBuilder
via command line.
This method is most likely used for logging and user output or debugging.
The results of this method depend on the Operating System as command line arguments on Unix and Windows are quoted and escaped differently.
processBuilder
- the process definitionprependWorkingDirectory
- if true
the working directory of
processBuilder
is prepended, else the
returned value consists of the command line
only.Copyright © 2025. All rights reserved.