org.objectweb.carol.util.bootstrap

Class JVMConfiguration

Implemented Interfaces:
Serializable

public class JVMConfiguration
extends java.lang.Object
implements Serializable

Class JVMConfiguration Is a Data structure representing a Java command This class is serializable and can be pass througth a RMI call (for the Java Deamon for example)

Version:
1.0, 15/07/2002

Author:
Guillaume Riviere (Guillaume.Riviere@inrialpes.fr)

Field Summary

String
className
String for classname
Vector
classpath
String Vector for classpath (path and jar file) Be carful, this is for the moment RJVM server System dependant
boolean
debug
Boolean for jvm -debug option
String
jarName
String for -jar option
String
mainArgs
String for class main args [] option
Vector
nonStandard
String Vector for non Standard options (-X...)
Properties
properties
Properties for system properties (-D...) options
boolean
server
Boolean for jvm -server option
boolean
verbose
Boolean -verbose option
boolean
verboseClass
Boolean -verbose:class option
boolean
verboseGC
Boolean -verbose:gc option
boolean
verboseJNI
Boolean -verbose:jni option

Constructor Summary

JVMConfiguration()
empty constructor start with default
JVMConfiguration(String commandLine)
Constuctor with the jvm string This constructor is use "like a java ...

Method Summary

void
addArgs(String args)
add mains args ...
void
addNonStandard(String option)
ste non standard option (for example bootclasspath:/usr/local/lib/foo/foo.jar pass the -Xbootclasspath:/usr/local/lib/foo/foo.jar to the jvm)
void
addPath(String path)
add path for the jvm
void
addProperty(String key, String value)
add jvm -D property
String
getCommandString()
Get the command string
void
setClass(String cName)
set the main class namle for the jvm
void
setDebug()
set jvm -debug option
void
setJar(String jName)
set -jar ...
void
setServer()
set jvm -server option
void
setVerbose()
set -verbose option
void
setVerboseClass()
set -verbose:class option
void
setVerboseGC()
set -verbose:gc option
void
setVerboseJNI()
set -verbose:jni option

Field Details

className

public String className
String for classname


classpath

public Vector classpath
String Vector for classpath (path and jar file) Be carful, this is for the moment RJVM server System dependant


debug

public boolean debug
Boolean for jvm -debug option


jarName

public String jarName
String for -jar option


mainArgs

public String mainArgs
String for class main args [] option


nonStandard

public Vector nonStandard
String Vector for non Standard options (-X...)


properties

public Properties properties
Properties for system properties (-D...) options


server

public boolean server
Boolean for jvm -server option


verbose

public boolean verbose
Boolean -verbose option


verboseClass

public boolean verboseClass
Boolean -verbose:class option


verboseGC

public boolean verboseGC
Boolean -verbose:gc option


verboseJNI

public boolean verboseJNI
Boolean -verbose:jni option

Constructor Details

JVMConfiguration

public JVMConfiguration()
empty constructor start with default


JVMConfiguration

public JVMConfiguration(String commandLine)
            throws ProcessException
Constuctor with the jvm string This constructor is use "like a java ... command" and parse the string

Method Details

addArgs

public void addArgs(String args)
            throws ProcessException
add mains args ... option


addNonStandard

public void addNonStandard(String option)
ste non standard option (for example bootclasspath:/usr/local/lib/foo/foo.jar pass the -Xbootclasspath:/usr/local/lib/foo/foo.jar to the jvm)


addPath

public void addPath(String path)
add path for the jvm


addProperty

public void addProperty(String key,
                        String value)
add jvm -D property


getCommandString

public String getCommandString()
            throws ProcessException
Get the command string

Throws:
ProcessException - if the class or jar option is not set


setClass

public void setClass(String cName)
            throws ProcessException
set the main class namle for the jvm

Throws:
ProcessException - if the jar option is set


setDebug

public void setDebug()
set jvm -debug option


setJar

public void setJar(String jName)
            throws ProcessException
set -jar ... option

Throws:
ProcessException - if the class option is set


setServer

public void setServer()
set jvm -server option


setVerbose

public void setVerbose()
set -verbose option


setVerboseClass

public void setVerboseClass()
set -verbose:class option


setVerboseGC

public void setVerboseGC()
set -verbose:gc option


setVerboseJNI

public void setVerboseJNI()
set -verbose:jni option