Package hudson.util
Class JVMBuilder
- java.lang.Object
-
- hudson.util.JVMBuilder
-
- All Implemented Interfaces:
Serializable
public class JVMBuilder extends Object implements Serializable
Used to build up launch parameters for a Java virtual machine.- Since:
- 1.361
- Author:
- Kohsuke Kawaguchi
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JVMBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArgumentListBuilder
args()
Arguments to the main class.ClasspathBuilder
classpath()
Returns a builder object for creating classpath arguments.JVMBuilder
debug(int port)
Enables the debugger support on the given port.Launcher.ProcStarter
launch(Launcher launcher)
Fills aLauncher.ProcStarter
with all the parameters configured by this builder.JVMBuilder
mainClass(Class mainClass)
JVMBuilder
mainClass(String fullyQualifiedClassName)
JVMBuilder
pwd(FilePath pwd)
Sets the current directory for the new JVM.JVMBuilder
pwd(File pwd)
Sets the current directory for the new JVM.Map<String,String>
systemProperties()
JVMBuilder
systemProperties(Map<String,String> props)
JVMBuilder
systemProperty(String key, String value)
ArgumentListBuilder
toFullArguments()
ArgumentListBuilder
vmopts()
JVM options.
-
-
-
Method Detail
-
classpath
public ClasspathBuilder classpath()
Returns a builder object for creating classpath arguments.
-
systemProperty
public JVMBuilder systemProperty(String key, String value)
-
systemProperties
public JVMBuilder systemProperties(Map<String,String> props)
-
args
public ArgumentListBuilder args()
Arguments to the main class.
-
vmopts
public ArgumentListBuilder vmopts()
JVM options.
-
pwd
public JVMBuilder pwd(FilePath pwd)
Sets the current directory for the new JVM.
-
debug
public JVMBuilder debug(int port)
Enables the debugger support on the given port.
-
pwd
public JVMBuilder pwd(File pwd)
Sets the current directory for the new JVM. This overloaded version only makes sense when you are launching JVM locally.
-
mainClass
public JVMBuilder mainClass(String fullyQualifiedClassName)
-
mainClass
public JVMBuilder mainClass(Class mainClass)
-
toFullArguments
public ArgumentListBuilder toFullArguments()
-
launch
public Launcher.ProcStarter launch(Launcher launcher)
Fills aLauncher.ProcStarter
with all the parameters configured by this builder.
-
-