Class CommandLineBuilder
java.lang.Object
org.eclipse.jetty.start.CommandLineBuilder
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a simple argument to the command line.voidaddEqualsArg(String name, String value) Similar toaddArg(String)but concats both name + value with an "=" sign, quoting were needed, and excluding the "=" portion if the value is undefined or empty.voidAdd a simple argument to the command line.voiddebug()static FilefindExecutable(File root, String path) static StringgetArgs()static StringPerform an optional quoting of the argument, being intelligent with spaces and quotes as needed.toString()
-
Field Details
-
args
-
-
Constructor Details
-
CommandLineBuilder
public CommandLineBuilder() -
CommandLineBuilder
-
-
Method Details
-
findExecutable
-
findJavaBin
-
quote
-
addArg
Add a simple argument to the command line.Will quote arguments that have a space in them.
- Parameters:
arg- the simple argument to add
-
addEqualsArg
Similar toaddArg(String)but concats both name + value with an "=" sign, quoting were needed, and excluding the "=" portion if the value is undefined or empty.addEqualsArg("-Dname", "value") = "-Dname=value" addEqualsArg("-Djetty.home", "/opt/company inc/jetty (7)/") = "-Djetty.home=/opt/company\ inc/jetty\ (7)/" addEqualsArg("-Djenkins.workspace", "/opt/workspaces/jetty jdk7/") = "-Djenkins.workspace=/opt/workspaces/jetty\ jdk7/" addEqualsArg("-Dstress", null) = "-Dstress" addEqualsArg("-Dstress", "") = "-Dstress"- Parameters:
name- the namevalue- the value
-
addRawArg
Add a simple argument to the command line.Will NOT quote/escape arguments that have a space in them.
- Parameters:
arg- the simple argument to add
-
getArgs
-
toString
-
toString
-
debug
public void debug()
-