hudson.util
Class JVMBuilder

java.lang.Object
  extended by 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
JVMBuilder()
           
 
Method Summary
 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 a Launcher.ProcStarter with all the parameters configured by this builder.
 JVMBuilder mainClass(Class mainClass)
           
 JVMBuilder mainClass(String fullyQualifiedClassName)
           
 JVMBuilder pwd(File pwd)
          Sets the current directory for the new JVM.
 JVMBuilder pwd(FilePath 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JVMBuilder

public JVMBuilder()
Method Detail

classpath

public ClasspathBuilder classpath()
Returns a builder object for creating classpath arguments.


systemProperty

public JVMBuilder systemProperty(String key,
                                 String value)

systemProperties

public Map<String,String> systemProperties()

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 a Launcher.ProcStarter with all the parameters configured by this builder.



Copyright © 2004-2013. All Rights Reserved.