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 ArgumentListBuilderargs()Arguments to the main class.ClasspathBuilderclasspath()Returns a builder object for creating classpath arguments.JVMBuilderdebug(int port)Enables the debugger support on the given port.Launcher.ProcStarterlaunch(Launcher launcher)Fills aLauncher.ProcStarterwith all the parameters configured by this builder.JVMBuildermainClass(Class mainClass)JVMBuildermainClass(String fullyQualifiedClassName)JVMBuilderpwd(FilePath pwd)Sets the current directory for the new JVM.JVMBuilderpwd(File pwd)Sets the current directory for the new JVM.Map<String,String>systemProperties()JVMBuildersystemProperties(Map<String,String> props)JVMBuildersystemProperty(String key, String value)ArgumentListBuildertoFullArguments()ArgumentListBuildervmopts()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.ProcStarterwith all the parameters configured by this builder.
-
-