addArgument

public ManagedProcessBuilder addArgument(String arg, boolean handleQuoting)

Adds a raw argument to the command.

Return

this builder instance for chaining

Parameters

arg

the argument text

handleQuoting

if true, escape/quote as needed


Adds a Path as an argument to the command. This uses toRealPath, which is usually what you'll actually want when launching external processes.

Return

this

Parameters

arg

the Path to add

See also

Throws

if toRealPath and the getCanonicalPath fallback both fail.


Adds an argument to the command.

Return

this

Parameters

arg

the String Argument to add. It will be escaped with single or double quote if it contains a space.

See also


public ManagedProcessBuilder addArgument(String argPart1, String argPart2)

Adds a single argument to the command, composed of two parts. The two parts are independently escaped (see addArgument), and then concatenated without any separator.

Return

this builder instance for chaining

Parameters

argPart1

the first part of the argument

argPart2

the second part of the argument