Package org.eclipse.jetty.start
Class CommandLineBuilder
java.lang.Object
org.eclipse.jetty.start.CommandLineBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionCommandLineBuilder(boolean multiline) CommandLineBuilder(String bin) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a simple argument to the command line, quoted if necessary.voidAdd a "name=value" style argument to the command line with name and value quoted if necessary.voidaddEqualsArg(String name, String value) Deprecated.voidAdds a "-OPTION" style option to the command line with no quoting, for example `--help`.voidAdds a "-OPTIONname=value" style option to the command line with name and value quoted if necessary, for example "-Dprop=value".voidDeprecated.useaddArg(String)voiddebug()static FilefindExecutable(File root, String path) static StringgetArgs()static StringDeprecated.static StringshellQuoteIfNeeded(String input) This method applies single quotes suitable for a POSIX compliant shell if necessary.A version oftoString()where every arg is evaluated for potential'(single-quote tick) wrapping.Deprecated.usetoCommandLine()toString()
-
Constructor Details
-
CommandLineBuilder
public CommandLineBuilder() -
CommandLineBuilder
Deprecated. -
CommandLineBuilder
public CommandLineBuilder(boolean multiline)
-
-
Method Details
-
findExecutable
-
findJavaBin
-
quote
Deprecated.- Parameters:
arg- string- Returns:
- Quoted string
-
shellQuoteIfNeeded
This method applies single quotes suitable for a POSIX compliant shell if necessary.- Parameters:
input- The string to quote if needed- Returns:
- The quoted string or the original string if quotes are not necessary
-
addArg
Add a simple argument to the command line, quoted if necessary.- Parameters:
arg- the simple argument to add
-
addEqualsArg
Deprecated. -
addArg
Add a "name=value" style argument to the command line with name and value quoted if necessary.- Parameters:
name- the namevalue- the value
-
addRawArg
Deprecated.useaddArg(String) -
addOption
Adds a "-OPTION" style option to the command line with no quoting, for example `--help`.- Parameters:
option- the option
-
addOption
Adds a "-OPTIONname=value" style option to the command line with name and value quoted if necessary, for example "-Dprop=value".- Parameters:
option- the optionname- the namevalue- the value
-
getArgs
-
toString
-
toQuotedString
Deprecated.usetoCommandLine() -
toCommandLine
A version oftoString()where every arg is evaluated for potential'(single-quote tick) wrapping.- Returns:
- the toString but each arg that has spaces is surrounded by
'(single-quote tick)
-
debug
public void debug()
-
addArg(String, String)