#include <xmog_jvm_options.h>
Inheritance diagram for xmog_jvm_options:

Public Member Functions | |
| virtual void | appendToAppendBootClassPath (const char *cp) |
Appends a classpath root to the current value of the -Xbootclasspath/a: option. | |
| virtual void | appendToBootClassPath (const char *cp) |
Appends a new classpath root to the value of the -Xbootclasspath: option. | |
| virtual void | appendToClassPath (const char *cp) |
| Appends a string to the system classpath. | |
| virtual void | appendToDisabledAssertions (const char *da) |
| virtual void | appendToEnabledAssertions (const char *ea) |
| virtual void | appendToExtensionsDirectories (const char *ed) |
| Appends a directory to the extensions path. | |
| virtual void | appendToLibraryPath (const char *lp) |
| Appends a string to the library search path. | |
| virtual void | appendToPrependBootClassPath (const char *cp) |
Appends a classpath root to the current value of the -Xbootclasspath/p: option. | |
| virtual XMOG_ABORT | getAbort () |
Returns the abort callback that the JVM calls before aborting. | |
| virtual char * | getAppendBootClassPath () |
Returns the value of the -Xbootclasspath/a: option. | |
| virtual bool | getBatchMode () |
Returns true if the -Xbatch option is set, false otherwise. | |
| virtual char * | getBootClassPath () |
Returns the value of the -Xbootclasspath: option. | |
| virtual bool | getCheckJni () |
Returns true if the -Xcheck:jni option is set, false otherwise. | |
| virtual bool | getCheckSource () |
| virtual char * | getClassPath () |
| Returns the configured system classpath. | |
| virtual char * | getDashDOption (const char *name) |
Returns the value of a -D option (a system property) or NULL if the option is undefined. | |
| virtual char * | getDashXOption (const char *name) |
Returns the value of a -X option (a generic JVM option) or NULL if the option is undefined. | |
| virtual bool | getDebug () |
Returns true if the -Xdebug option is set, false otherwise. | |
| virtual bool | getDisableAsyncGC () |
| virtual bool | getDisableClassGC () |
Returns the value of the -Xnoclassgc option. | |
| virtual char * | getDisabledAssertions () |
| virtual bool | getDisableSystemAssertions () |
| virtual bool | getEnableClassGC () |
Returns the opposite of the value of the -Xnoclassgc option. | |
| virtual char * | getEnabledAssertions () |
| virtual bool | getEnableSystemAssertions () |
| virtual bool | getEnableVerboseGC () |
| virtual XMOG_EXIT | getExit () |
Returns the exit callback that the JVM calls before exiting. | |
| virtual char * | getExtensionsDirectories () |
| Returns the configured extensions directories. | |
| virtual bool | getFuture () |
Returns true if the -Xfuture option is set, false otherwise. | |
| virtual bool | getIgnoreUnrecognized () |
| Returns whether or not unrecognized initialization options are ignored or not. | |
| virtual bool | getIncrementalGC () |
| Returns the value of the incremental garbage collection option. | |
| virtual void * | getInitArgs (jint jniVersion) |
| Returns a pointer to an object that can be used to initialize a JVM. | |
| virtual jint | getInitialHeapSizeInMB () |
| Returns the initial heapsize in MB. | |
| virtual bool | getInterpretedMode () |
Returns the value of the -Xint option. | |
| virtual jint | getJniVersion () |
| Returns the configured JNI version. | |
| virtual char * | getLibraryPath () |
| Returns the configured library search path. | |
| virtual char * | getLogGCFile () |
| Returns the value of the garbage collection log file option. | |
| virtual jint | getMaximumHeapSizeInMB () |
Returns the configured maximum heap size in MB or 0 if none is configured. | |
| virtual bool | getMixedMode () |
Returns the value of the -Xmixed option. | |
| virtual jint | getNativeStackSizeInKB () |
| virtual bool | getNoagent () |
Returns true if the -Xnoagent option is set, false otherwise. | |
| virtual void * | getOtherOption (const char *name) |
| Allows the querying of a JVM option that is neither a -D nor a -X option. | |
| virtual char * | getPrependBootClassPath () |
Returns the value of the -Xbootclasspath/p: option. | |
| virtual bool | getProf () |
Returns true if the -Xprof options is used. | |
| virtual bool | getReduceSignals () |
Returns true if the -Xrs option is set, false otherwise. | |
| virtual char * | getRun () |
Returns the value of the -Xrun option. | |
| virtual char * | getSecurityManager () |
| Returns the classname of the application's security manager. | |
| virtual char * | getSecurityPolicy () |
| Returns the filename of the application's security policy. | |
| virtual jint | getStackSizeInKB () |
| Returns the stack size for Java threads in kB. | |
| virtual xmog_jvm_verbosity | getVerbosity () |
| Returns the configured JVM verbosity. | |
| virtual xmog_bytecode_verification | getVerifyMode () |
| virtual XMOG_VFPRINTF | getVfprintf () |
Returns the vfprintf callback that the JVM uses for reporting JVM information. | |
| virtual void | mergeWithDefaults (JDK1_1InitArgs &iargs11) |
| virtual void | prependToClassPath (const char *cp) |
| Prepends a string to the system classpath. | |
| virtual int | readJvmOptions (const char *file, XMOGVERSION vers=NULL, XMOGCONFIG conf=NULL, XMOGVERSION reserved0=NULL) |
| Reads the JVM initialization options from a configuration file or the Windows registry. | |
| virtual void | removeDashDOption (const char *name) |
Removes a -D option (a system property) from the configuration. | |
| virtual void | removeDashXOption (const char *name) |
Removes a -X option (a generic JVM option) from the configuration. | |
| virtual void | removeOtherOption (const char *name) |
| Removes a JVM option that is neither a -D nor a -X option. | |
| virtual void | reset () |
| Reestablishes the default (uninitialized) values. | |
| virtual void | setAbort (const char *ab) |
| Sets the callback that the JVM calls before aborting. | |
| virtual void | setAbort (XMOG_ABORT ab) |
| Sets the callback that the JVM calls before aborting. | |
| virtual void | setAppendBootClassPath (const char *cp) |
Sets the value of the -Xbootclasspath/a: option. | |
| virtual void | setBatchMode (const char *b) |
Sets or clears the -Xbatch option. | |
| virtual void | setBatchMode (bool b) |
Sets or clears the -Xbatch option. | |
| virtual void | setBootClassPath (const char *cp) |
Sets the value of the -Xbootclasspath: option. | |
| virtual void | setCheckJni (const char *cjni) |
Sets or clears the -Xcheck:jni option. | |
| virtual void | setCheckJni (bool cjni) |
Sets or clears the -Xcheck:jni option. | |
| virtual void | setCheckSource (bool cs) |
| virtual void | setClassPath (const char *cp) |
| Sets the system classpath. | |
| virtual void | setDashDOption (const char *name, const char *value=0) |
Sets a -D option (a system property). | |
| virtual void | setDashXOption (const char *name, const char *value=0) |
Sets a -X option (a generic JVM option). | |
| virtual void | setDebug (const char *d) |
Sets or clears the -Xdebug option. | |
| virtual void | setDebug (bool d) |
Sets or clears the -Xdebug option. | |
| virtual void | setDisableAsyncGC (bool dagc) |
| virtual void | setDisableClassGC (const char *dcgc) |
Sets the value of the -Xnoclassgc option. | |
| virtual void | setDisableClassGC (bool dcgc) |
Sets the value of the -Xnoclassgc option. | |
| virtual void | setDisabledAssertions (const char *da) |
| virtual void | setDisableSystemAssertions (const char *dsa) |
| virtual void | setDisableSystemAssertions (bool dsa) |
| virtual void | setEnableClassGC (const char *ecgc) |
Sets the opposite of the value of the -Xnoclassgc option. | |
| virtual void | setEnableClassGC (bool ecgc) |
Sets the opposite of the value of the -Xnoclassgc option. | |
| virtual void | setEnabledAssertions (const char *ea) |
| virtual void | setEnableSystemAssertions (const char *esa) |
| virtual void | setEnableSystemAssertions (bool esa) |
| virtual void | setEnableVerboseGC (const char *evgc) |
| virtual void | setEnableVerboseGC (bool evgc) |
| virtual void | setExit (const char *ex) |
| Sets the callback that the JVM calls before exiting. | |
| virtual void | setExit (XMOG_EXIT ex) |
| Sets the callback that the JVM calls before exiting. | |
| virtual void | setExtensionsDirectories (const char *ed) |
| Sets the path on which the JVM searches for jarfiles that are treated like system types. | |
| virtual void | setFuture (const char *future) |
Sets or clears the -Xfuture option. | |
| virtual void | setFuture (bool future) |
Sets or clears the -Xfuture option. | |
| virtual void | setIgnoreUnrecognized (const char *ignore) |
| Sets whether or not unrecognized initialization options should be ignored or not. | |
| virtual void | setIgnoreUnrecognized (bool ignore) |
| Sets whether or not unrecognized initialization options should be ignored or not. | |
| virtual void | setIncrementalGC (const char *i) |
| Enables or disables incremental garbage collection. | |
| virtual void | setIncrementalGC (bool i) |
| Enables or disables incremental garbage collection. | |
| virtual void | setInitialHeapSize (const char *ihs) |
| Sets the initial heap size. | |
| virtual void | setInitialHeapSizeInMB (jint ihs) |
| Sets the initial heap size for Java threads in MB. | |
| virtual void | setInterpretedMode (const char *i) |
Sets the value of the -Xint option. | |
| virtual void | setInterpretedMode (bool i) |
Sets the value of the -Xint option. | |
| virtual void | setJniVersion (const char *version) |
| Sets the JNI version that is going to be used (in JRE 1.2.x or higher only). | |
| virtual void | setJniVersion (jint version) |
| Sets the JNI version that is going to be used (in JRE 1.2.x or higher only). | |
| virtual void | setLibraryPath (const char *lp) |
| Sets the path on which the JVM searches for native libraries. | |
| virtual void | setLogGCFile (const char *file) |
| Sets the log file used by the JVM. | |
| virtual void | setMaximumHeapSize (const char *mhs) |
| Sets the maximum heap size. | |
| virtual void | setMaximumHeapSizeInMB (jint mhs) |
| Sets the maximum heap size in MB. | |
| virtual void | setMixedMode (const char *m) |
Sets the value of the -Xmixed option. | |
| virtual void | setMixedMode (bool m) |
Sets the value of the -Xmixed option. | |
| virtual void | setNativeStackSizeInKB (jint nss) |
| virtual void | setNoagent (const char *na) |
Sets or clears the -Xnoagent option. | |
| virtual void | setNoagent (bool na) |
Sets or clears the -Xnoagent option. | |
| virtual void | setOtherOption (const char *namevalue, void *ptr=0) |
| Allows the specification of a JVM option that is neither a -D nor a -X option. | |
| virtual void | setPrependBootClassPath (const char *cp) |
Sets the value of the -Xbootclasspath/p: option. | |
| virtual void | setProf (const char *p) |
Sets the -Xprof option if "true". | |
| virtual void | setProf (bool p) |
Sets the -Xprof option if true. | |
| virtual void | setReduceSignals (const char *rs) |
Sets or clears the -Xrs option. | |
| virtual void | setReduceSignals (bool rs) |
Sets or clears the -Xrs option. | |
| virtual void | setRun (const char *runopts) |
Sets the -Xrun option. | |
| virtual void | setSecurityManager (const char *sm) |
| Sets the class that is the security manager for the application. | |
| virtual void | setSecurityPolicy (const char *policyFile) |
| Sets the policy file containing security settings for the application. | |
| virtual void | setStackSize (const char *ss) |
| Sets the stack size for Java threads. | |
| virtual void | setStackSizeInKB (jint ss) |
| Sets the stack size for Java threads in kB. | |
| virtual void | setVerbosity (xmog_jvm_verbosity v) |
| virtual void | setVerbosity (const char *v) |
| virtual void | setVerbosity (int v) |
| virtual void | setVerifyMode (xmog_bytecode_verification ver) |
| virtual void | setVfprintf (const char *vfp) |
Sets the vfprintf callback that the JVM uses for reporting JVM information. | |
| virtual void | setVfprintf (XMOG_VFPRINTF vfp) |
Sets the vfprintf callback that the JVM uses for reporting JVM information. | |
| xmog_jvm_options (const char *filename, XMOGVERSION vers, XMOGCONFIG conf, XMOGVERSION reserved0, bool bEnvOverrides=true) | |
| Creates an options object. | |
Protected Member Functions | |
| void | env_override () |
| xmog_jvm_options (int argc, char *argv[], bool bEnvOverrides=true) | |
| xmog_jvm_options (XMOGVERSION vers, XMOGCONFIG conf, XMOGVERSION reserved0, bool bEnvOverrides=true) | |
| xmog_jvm_options (const char *filename, bool bEnvOverrides=true) | |
| xmog_jvm_options (bool bEnvOverrides=true) | |
This class is usually used via inheritance, through the xmog_jvm_loader type, which acts as a factory for an xmog_jvm instance. The derived type inherits all the methods for getting and setting JVM initialization settings like system properties or memory options. This type supports the following settings:
| Setting | File or Registry | CLI | Environment | Description |
| Abort callback | Abort | -abort | XMOG_ABORT | The abort callback function. |
| AppendBootclasspath | AppendBootClasspath | -bootclasspath/a: | XMOG_BOOT_CLASS_PATH | The append bootclasspath to be used. This corresponds with the -Xbootclasspath/a: option. |
| Bootclasspath | BootClasspath | -bootclasspath: | XMOG_BOOT_CLASS_PATH | The bootclasspath to be used. This corresponds with the -Xbootclasspath: option. |
| Check JNI | CheckJni | -check:jni | XMOG_CHECK_JNI | Run extra validation code on JNI arguments and calls. Much slower than normal operation; should only be used in debugging scenarios. This corresponds with the -Xcheck:jni option. |
| Classpath | Classpath | -classpath | CLASSPATH | The classpath to be used. This corresponds with the Java -cp option. |
| -D Options | Add a generic -D option. This corresponds with the Java -D option. | |||
| Debug | Debug | -debug | XMOG_DEBUG | Run the JVM in debug mode. This corresponds with the Java -Xdebug option. |
| Ignore unrecognized | IgnoreUnrecognized | Boolean value which specifies whether we're ignoring unrecognized JNI options or whether we're failing JVM initialization in such a case. | ||
| Initial heapsize | InitialHeapSize | XMOG_INITIAL_HEAPSIZE | Corresponds with the Java -Xms option. | |
| JNI version | JNIVersion | Set the version number of the JNIEnv that we're requesting. | ||
| Maximum heapsize | MaximumHeapSize | XMOG_MAXIMUM_HEAPSIZE | Corresponds with the Java -Xmx option. | |
| Profiling | Prof | -prof | XMOG_PROF | Add "prof" options, for example for profiling or debugging. This corresponds with the Java -Xprof option. |
| Run option | Run | -run | XMOG_RUN | Add "run" options, for example for profiling or debugging. This corresponds with the Java -Xrun option. |
| Stack size | StackSize | XMOG_STACKSIZE | Corresponds with the Java -Xss option. | |
| -X Options | Add a generic -X option. This corresponds with the Java -X option. |
|
||||||||||||||||||||||||
|
Creates an options object.
|
|
|
Appends a classpath root to the current value of the
|
|
|
Appends a new classpath root to the value of the
|
|
|
Appends a string to the system classpath.
|
|
|
Appends a directory to the extensions path.
|
|
|
Appends a string to the library search path.
|
|
|
Appends a classpath root to the current value of the
|
|
|
Returns the value of the
|
|
|
Returns the value of the
|
|
|
Returns the value of a
|
|
|
Returns the value of a
|
|
|
Returns the value of the
|
|
|
Returns the opposite of the value of the
|
|
|
Returns whether or not unrecognized initialization options are ignored or not.
|
|
|
Returns the value of the incremental garbage collection option.
This method returns
|
|
|
Returns a pointer to an object that can be used to initialize a JVM. The caller does not have to delete the returned value because the instance is maintained internally.
|
|
|
Returns the value of the
|
|
|
Returns the configured JNI version. The default value is 0x00010002 (65538), representing JRE 1.2. |
|
|
Returns the value of the garbage collection log file option.
This method returns the value of the
|
|
|
Returns the value of the
|
|
|
Allows the querying of a JVM option that is neither a -D nor a -X option.
|
|
|
Returns the value of the
|
|
|
Returns the configured JVM verbosity.
|
|
|
Prepends a string to the system classpath. Prepending is implemented as appending the original classpath to the given path. This is an unimportant implementation detail but it might confuse you if you look at the tracing output of this method.
|
|
||||||||||||||||||||
|
Reads the JVM initialization options from a configuration file or the Windows registry. This method is used to load the JVM initialization options from a file or from the Windows registry. Currently, old-style JunC++ion configuration files are supported as well as .NET-style configuration files.
|
|
|
Removes a
|
|
|
Removes a
|
|
|
Removes a JVM option that is neither a -D nor a -X option. Using this method, you can only remove exactly matching options, i.e. name and value of the option have to be identical.
|
|
|
Reestablishes the default (uninitialized) values. This method may be useful if you started to configure the options before discovering that you need to start over with different values. |
|
|
Sets the callback that the JVM calls before aborting.
|
|
|
Sets the callback that the JVM calls before aborting.
|
|
|
Sets the value of the
|
|
|
Sets or clears the
|
|
|
Sets or clears the
|
|
|
Sets the value of the
|
|
|
Sets or clears the You usually won't need this option unless you're debugging your application and want to rule out JNI errors. Setting this option can dramatically slow down your application.
|
|
|
Sets or clears the You usually won't need this option unless you're debugging your application and want to rule out JNI errors. Setting this option can dramatically slow down your application.
|
|
|
Sets the system classpath. This method should be avoided in deference to appendToClassPath() in order to avoid path separator portability issues and to allow configuration hooks to contribute to the classpath configuration.
This method corresponds with the
|
|
||||||||||||
|
Sets a
|
|
||||||||||||
|
Sets a Most commonly used JVM options are available via more convenient wrapper functions, but you can use the option's raw name as well.
|
|
|
Sets or clears the
|
|
|
Sets or clears the
|
|
|
Sets the value of the
|
|
|
Sets the value of the
|
|
|
Sets the opposite of the value of the
|
|
|
Sets the opposite of the value of the
|
|
|
Sets the callback that the JVM calls before exiting.
|
|
|
Sets the callback that the JVM calls before exiting.
|
|
|
Sets the path on which the JVM searches for jarfiles that are treated like system types. This method should be avoided in deference to appendToExtensionsDirectories() in order to avoid path separator portability issues and to allow configuration hooks to contribute to the configuration.
This method corresponds with the
|
|
|
Sets or clears the
|
|
|
Sets or clears the
|
|
|
Sets whether or not unrecognized initialization options should be ignored or not.
If this is set to
|
|
|
Sets whether or not unrecognized initialization options should be ignored or not.
If this is set to
|
|
|
Enables or disables incremental garbage collection.
This method corresponds with the
|
|
|
Enables or disables incremental garbage collection.
This method corresponds with the
|
|
|
Sets the initial heap size. This method corresponds with the following implicit initialization mechanisms:
|
|
|
Sets the initial heap size for Java threads in MB. This method corresponds with the following implicit initialization mechanisms:
|
|
|
Sets the value of the
|
|
|
Sets the value of the
|