Package org.eclipse.jetty.start
Class CommandLineBuilder
java.lang.Object
org.eclipse.jetty.start.CommandLineBuilder
-
Constructor Summary
ConstructorDescriptionCommandLineBuilder
(boolean multiline) CommandLineBuilder
(String bin) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a simple argument to the command line, quoted if necessary.void
Add a "name=value" style argument to the command line with name and value quoted if necessary.void
addEqualsArg
(String name, String value) Deprecated.void
Adds a "-OPTION" style option to the command line with no quoting, for example `--help`.void
Adds a "-OPTIONname=value" style option to the command line with name and value quoted if necessary, for example "-Dprop=value".void
Deprecated.useaddArg(String)
void
debug()
static File
findExecutable
(File root, String path) static String
getArgs()
static String
Deprecated.static String
shellQuoteIfNeeded
(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)