Codemesh Runtime v3 C++ API Reference
3.9.205
|
A class abstracting the maintenance and initialization of JVM configuration options. More...
#include <xmog_jvm_options.h>
Public Member Functions | |
xmog_jvm_options (const char *filename, XMOGVERSION vers, XMOGCONFIG conf, XMOGVERSION reserved0, bool bEnvOverrides=true) | |
Creates an options object. More... | |
virtual void * | getInitArgs (jint jniVersion) |
Returns a pointer to an object that can be used to initialize a JVM. More... | |
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. More... | |
virtual void | reset () |
Reestablishes the default (uninitialized) values. More... | |
virtual void | setJniVersion (jint version) |
Sets the JNI version that is going to be used (in JRE 1.2.x or higher only). More... | |
virtual void | setJniVersion (const char *version) |
Sets the JNI version that is going to be used (in JRE 1.2.x or higher only). More... | |
virtual jint | getJniVersion () |
Returns the configured JNI version. More... | |
virtual void | setIgnoreUnrecognized (bool ignore) |
Sets whether or not unrecognized initialization options should be ignored or not. More... | |
virtual void | setIgnoreUnrecognized (const char *ignore) |
Sets whether or not unrecognized initialization options should be ignored or not. More... | |
virtual bool | getIgnoreUnrecognized () |
Returns whether or not unrecognized initialization options are ignored or not. More... | |
virtual void | setStackSizeInKB (jint ss) |
Sets the stack size for Java threads in kB. More... | |
virtual void | setStackSize (const char *ss) |
Sets the stack size for Java threads. More... | |
virtual jint | getStackSizeInKB () |
Returns the stack size for Java threads in kB. | |
virtual void | setInitialHeapSizeInMB (jint ihs) |
Sets the initial heap size for Java threads in MB. More... | |
virtual void | setInitialHeapSize (const char *ihs) |
Sets the initial heap size. More... | |
virtual jint | getInitialHeapSizeInMB () |
Returns the initial heapsize in MB. | |
virtual void | setMaximumHeapSizeInMB (jint mhs) |
Sets the maximum heap size in MB. More... | |
virtual void | setMaximumHeapSize (const char *mhs) |
Sets the maximum heap size. More... | |
virtual jint | getMaximumHeapSizeInMB () |
Returns the configured maximum heap size in MB or 0 if none is configured. | |
virtual void | setDashDOption (const char *name, const char *value=0) |
Sets a -D option (a system property). More... | |
virtual char * | getDashDOption (const char *name) |
Returns the value of a -D option (a system property) or NULL if the option is undefined. More... | |
virtual void | removeDashDOption (const char *name) |
Removes a -D option (a system property) from the configuration. More... | |
virtual void | setDashXOption (const char *name, const char *value=0) |
Sets a -X option (a generic JVM option). More... | |
virtual char * | getDashXOption (const char *name) |
Returns the value of a -X option (a generic JVM option) or NULL if the option is undefined. More... | |
virtual void | removeDashXOption (const char *name) |
Removes a -X option (a generic JVM option) from the configuration. More... | |
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. More... | |
virtual void * | getOtherOption (const char *name) |
Allows the querying of a JVM option that is neither a -D nor a -X option. More... | |
virtual void | removeOtherOption (const char *name) |
Removes a JVM option that is neither a -D nor a -X option. More... | |
virtual void | setClassPath (const char *cp) |
Sets the system classpath. More... | |
virtual void | appendToClassPath (const char *cp) |
Appends a string to the system classpath. More... | |
virtual void | prependToClassPath (const char *cp) |
Prepends a string to the system classpath. More... | |
virtual char * | getClassPath () |
Returns the configured system classpath. | |
virtual void | setLibraryPath (const char *lp) |
Sets the path on which the JVM searches for native libraries. More... | |
virtual void | appendToLibraryPath (const char *lp) |
Appends a string to the library search path. More... | |
virtual char * | getLibraryPath () |
Returns the configured library search path. | |
virtual void | setExtensionsDirectories (const char *ed) |
Sets the path on which the JVM searches for jarfiles that are treated like system types. More... | |
virtual void | appendToExtensionsDirectories (const char *ed) |
Appends a directory to the extensions path. More... | |
virtual char * | getExtensionsDirectories () |
Returns the configured extensions directories. | |
virtual void | setSecurityManager (const char *sm) |
Sets the class that is the security manager for the application. More... | |
virtual char * | getSecurityManager () |
Returns the classname of the application's security manager. More... | |
virtual void | setSecurityPolicy (const char *policyFile) |
Sets the policy file containing security settings for the application. More... | |
virtual char * | getSecurityPolicy () |
Returns the filename of the application's security policy. More... | |
virtual void | setVfprintf (XMOG_VFPRINTF vfp) |
Sets the vfprintf callback that the JVM uses for reporting JVM information. More... | |
virtual void | setVfprintf (const char *vfp) |
Sets the vfprintf callback that the JVM uses for reporting JVM information. More... | |
virtual XMOG_VFPRINTF | getVfprintf () |
Returns the vfprintf callback that the JVM uses for reporting JVM information. More... | |
virtual void | setExit (XMOG_EXIT ex) |
Sets the callback that the JVM calls before exiting. More... | |
virtual void | setExit (const char *ex) |
Sets the callback that the JVM calls before exiting. More... | |
virtual XMOG_EXIT | getExit () |
Returns the exit callback that the JVM calls before exiting. More... | |
virtual void | setAbort (XMOG_ABORT ab) |
Sets the callback that the JVM calls before aborting. More... | |
virtual void | setAbort (const char *ab) |
Sets the callback that the JVM calls before aborting. More... | |
virtual XMOG_ABORT | getAbort () |
Returns the abort callback that the JVM calls before aborting. More... | |
virtual void | setDisableClassGC (bool dcgc) |
Sets the value of the -Xnoclassgc option. More... | |
virtual void | setDisableClassGC (const char *dcgc) |
Sets the value of the -Xnoclassgc option. More... | |
virtual bool | getDisableClassGC () |
Returns the value of the -Xnoclassgc option. More... | |
virtual void | setEnableClassGC (bool ecgc) |
Sets the opposite of the value of the -Xnoclassgc option. More... | |
virtual void | setEnableClassGC (const char *ecgc) |
Sets the opposite of the value of the -Xnoclassgc option. More... | |
virtual bool | getEnableClassGC () |
Returns the opposite of the value of the -Xnoclassgc option. More... | |
virtual void | setEnableVerboseGC (bool evgc) |
virtual void | setEnableVerboseGC (const char *evgc) |
virtual bool | getEnableVerboseGC () |
virtual void | setEnabledAssertions (const char *ea) |
virtual void | appendToEnabledAssertions (const char *ea) |
virtual char * | getEnabledAssertions () |
virtual void | setDisabledAssertions (const char *da) |
virtual void | appendToDisabledAssertions (const char *da) |
virtual char * | getDisabledAssertions () |
virtual void | setEnableSystemAssertions (bool esa) |
virtual void | setEnableSystemAssertions (const char *esa) |
virtual bool | getEnableSystemAssertions () |
virtual void | setDisableSystemAssertions (bool dsa) |
virtual void | setDisableSystemAssertions (const char *dsa) |
virtual bool | getDisableSystemAssertions () |
virtual void | setVerbosity (int v) |
virtual void | setVerbosity (const char *v) |
virtual void | setVerbosity (xmog_jvm_verbosity v) |
virtual xmog_jvm_verbosity | getVerbosity () |
Returns the configured JVM verbosity. More... | |
virtual void | setMixedMode (bool m) |
Sets the value of the -Xmixed option. More... | |
virtual void | setMixedMode (const char *m) |
Sets the value of the -Xmixed option. More... | |
virtual bool | getMixedMode () |
Returns the value of the -Xmixed option. More... | |
virtual void | setInterpretedMode (bool i) |
Sets the value of the -Xint option. More... | |
virtual void | setInterpretedMode (const char *i) |
Sets the value of the -Xint option. More... | |
virtual bool | getInterpretedMode () |
Returns the value of the -Xint option. More... | |
virtual void | setAppendBootClassPath (const char *cp) |
Sets the value of the -Xbootclasspath/a: option. More... | |
virtual void | appendToAppendBootClassPath (const char *cp) |
Appends a classpath root to the current value of the -Xbootclasspath/a: option. More... | |
virtual char * | getAppendBootClassPath () |
Returns the value of the -Xbootclasspath/a: option. More... | |
virtual void | setPrependBootClassPath (const char *cp) |
Sets the value of the -Xbootclasspath/p: option. More... | |
virtual void | appendToPrependBootClassPath (const char *cp) |
Appends a classpath root to the current value of the -Xbootclasspath/p: option. More... | |
virtual char * | getPrependBootClassPath () |
Returns the value of the -Xbootclasspath/p: option. More... | |
virtual void | setBootClassPath (const char *cp) |
Sets the value of the -Xbootclasspath: option. More... | |
virtual void | appendToBootClassPath (const char *cp) |
Appends a new classpath root to the value of the -Xbootclasspath: option. More... | |
virtual char * | getBootClassPath () |
Returns the value of the -Xbootclasspath: option. More... | |
virtual void | setIncrementalGC (bool i) |
Enables or disables incremental garbage collection. More... | |
virtual void | setIncrementalGC (const char *i) |
Enables or disables incremental garbage collection. More... | |
virtual bool | getIncrementalGC () |
Returns the value of the incremental garbage collection option. More... | |
virtual void | setLogGCFile (const char *file) |
Sets the log file used by the JVM. More... | |
virtual char * | getLogGCFile () |
Returns the value of the garbage collection log file option. More... | |
virtual void | setBatchMode (bool b) |
Sets or clears the -Xbatch option. More... | |
virtual void | setBatchMode (const char *b) |
Sets or clears the -Xbatch option. More... | |
virtual bool | getBatchMode () |
Returns true if the -Xbatch option is set, false otherwise. | |
virtual void | setProf (bool p) |
Sets the -Xprof option if true . More... | |
virtual void | setProf (const char *p) |
Sets the -Xprof option if "true" . More... | |
virtual bool | getProf () |
Returns true if the -Xprof options is used. | |
virtual void | setRun (const char *runopts) |
Sets the -Xrun option. More... | |
virtual char * | getRun () |
Returns the value of the -Xrun option. | |
virtual void | setDebug (bool d) |
Sets or clears the -Xdebug option. More... | |
virtual void | setDebug (const char *d) |
Sets or clears the -Xdebug option. More... | |
virtual bool | getDebug () |
Returns true if the -Xdebug option is set, false otherwise. | |
virtual void | setNoagent (bool na) |
Sets or clears the -Xnoagent option. More... | |
virtual void | setNoagent (const char *na) |
Sets or clears the -Xnoagent option. More... | |
virtual bool | getNoagent () |
Returns true if the -Xnoagent option is set, false otherwise. | |
virtual void | setReduceSignals (bool rs) |
Sets or clears the -Xrs option. More... | |
virtual void | setReduceSignals (const char *rs) |
Sets or clears the -Xrs option. More... | |
virtual bool | getReduceSignals () |
Returns true if the -Xrs option is set, false otherwise. | |
virtual void | setCheckJni (bool cjni) |
Sets or clears the -Xcheck:jni option. More... | |
virtual void | setCheckJni (const char *cjni) |
Sets or clears the -Xcheck:jni option. More... | |
virtual bool | getCheckJni () |
Returns true if the -Xcheck:jni option is set, false otherwise. | |
virtual void | setFuture (bool future) |
Sets or clears the -Xfuture option. More... | |
virtual void | setFuture (const char *future) |
Sets or clears the -Xfuture option. More... | |
virtual bool | getFuture () |
Returns true if the -Xfuture option is set, false otherwise. | |
virtual void | addAgentLib (const char *pAgentLib) |
Add an -agentlib: option to the settings. More... | |
virtual void | addAgentPath (const char *pAgentPath) |
Add an -agentpath: option to the settings. More... | |
virtual void | addJavaAgent (const char *pJavaAgent) |
Add an -javaagent: option to the settings. More... | |
virtual void | mergeWithDefaults (JDK1_1InitArgs &iargs11) |
A deprecated JNI 1.1 option. | |
virtual void | setCheckSource (bool cs) |
A deprecated JNI 1.1 option. | |
virtual bool | getCheckSource () |
A deprecated JNI 1.1 option. | |
virtual void | setNativeStackSizeInKB (jint nss) |
A deprecated JNI 1.1 option. | |
virtual jint | getNativeStackSizeInKB () |
A deprecated JNI 1.1 option. | |
virtual void | setVerifyMode (xmog_bytecode_verification ver) |
A deprecated JNI 1.1 option. | |
virtual xmog_bytecode_verification | getVerifyMode () |
A deprecated JNI 1.1 option. | |
virtual void | setDisableAsyncGC (bool dagc) |
A deprecated JNI 1.1 option. | |
virtual bool | getDisableAsyncGC () |
A deprecated JNI 1.1 option. | |
virtual void | addModules (const char *pMdules) |
Add an –add-modules option to the setings. More... | |
virtual void | setModulePath (const char *mp) |
Sets the module path. More... | |
virtual void | appendToModulePath (const char *mp) |
Appends a string to the module path. More... | |
virtual void | prependToModulePath (const char *mp) |
Prepends a string to the module path. More... | |
virtual char * | getModulePath () |
Returns the configured module path. More... | |
virtual void | addOpens (const char *pMod, const char *pPackage, const char *pReadingModule="ALL-UNNAMED") |
Opens a package to a module. More... | |
virtual void | addExports (const char *pMod, const char *pPackage, const char *pReadingModule="ALL-UNNAMED") |
Exports a package to a module. More... | |
virtual void | addReads (const char *pModule, const char *pModules) |
Enables a module to use public types from one or more other modules. More... | |
A class abstracting the maintenance and initialization of JVM configuration options.
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. |
xmog_jvm_options::xmog_jvm_options | ( | const char * | filename, |
XMOGVERSION | vers, | ||
XMOGCONFIG | conf, | ||
XMOGVERSION | reserved0, | ||
bool | bEnvOverrides = true |
||
) |
Creates an options object.
filename | the name of the file containing the configuration data. May be NULL to signal the registry on Windows. |
vers | the version number. May be NULL if old-style file format is not used. |
conf | the configuration name. May be NULL if old-style file format is not used. |
reserved0 | Unused. |
bEnvOverride | true if environment variables can be used to override settings. Defaults to true . |
|
virtual |
Add an -agentlib:
option to the settings.
pAgentLib | the value of the option that should contain everything following the leading -agentlib: string. |
|
virtual |
Add an -agentpath:
option to the settings.
pAgentPath | the value of the option that should contain everything following the leading -agentpath: string. |
|
virtual |
Exports a package to a module.
This option corresponds with the –add-exports
commandline option.
This option should only be used with Java9 or higher, so if you are uncertain about your JRE you probably should not use it.
pMod | the module in which the package we want to export resides. |
pPackage | the package we want to make accessible. |
pReadingModule | the module to which we want to open the package. This defaults to ALL-UNNAMED , meaning that the package is opened to all types on the legacy classpath. |
|
virtual |
Add an -javaagent:
option to the settings.
pJavaAgent | the value of the option that should contain everything following the leading -javaagent: string. |
|
virtual |
Add an –add-modules option to the setings.
This setting should only be used with Java9 or higher, so if you are uncertain about your JRE you probably should not use it.
pModules | the value of the option that should contain anything following the space after –add-modules used from the launcher's commandline. This is usually a comma-separated list of module names or ALL-DEFAULT , ALL-SYSTEM , or ALL-MODULE-PATH . |
|
virtual |
Opens a package to a module.
This option corresponds with the –add-opens
commandline option.
This option should only be used with Java9 or higher, so if you are uncertain about your JRE you probably should not use it.
pMod | the module in which the package we want to open resides. |
pPackage | the package we want to make accessible. |
pReadingModule | the module to which we want to open the package. This defaults to ALL-UNNAMED , meaning that the package is opened to all types on the legacy classpath. |
|
virtual |
Enables a module to use public types from one or more other modules.
This option corresponds with the –add-reads
commandline option.
Multiple invocations with the same accessing module name will cause the accessed modules to be appended into a comma-separated list This option should only be used with Java9 or higher, so if you are uncertain about your JRE you probably should not use it.
pModule | the module which wants access to some public types in other modules. |
pModules | the modules we want to access. |
|
virtual |
Appends a classpath root to the current value of the -Xbootclasspath/a:
option.
cp | the classpath root to append to the append-bootclasspath. |
|
virtual |
Appends a new classpath root to the value of the -Xbootclasspath:
option.
The bootclasspath has been removed from JVMs starting with Java9. You can still use the appendbootclasspath and the prepentbootclasspath settings. Using the bootclasspath with a Java9+ JVM will cause a launch failure.
cp | the new classpath root that is appended to the bootclasspath. |
|
virtual |
Appends a string to the system classpath.
Since runtime version 3.7 this option supports a trailing asterisk and embedded environment variables in notation.
cp | an additional classpath root for the system classpath. |
|
virtual |
Appends a directory to the extensions path.
ed | an additional root for the extensions path. |
|
virtual |
Appends a string to the library search path.
lp | an additional root for the library search path. |
|
virtual |
Appends a string to the module path.
mp | an additional module path root for the module path |
|
virtual |
Appends a classpath root to the current value of the -Xbootclasspath/p:
option.
cp | the classpath root to append to the prepend-bootclasspath. |
|
virtual |
Returns the abort
callback that the JVM calls before aborting.
|
virtual |
Returns the value of the -Xbootclasspath/a:
option.
NULL
if none is configured.
|
virtual |
Returns the value of the -Xbootclasspath:
option.
The bootclasspath has been removed from JVMs starting with Java9. You can still use the appendbootclasspath and the prepentbootclasspath settings. Using the bootclasspath with a Java9+ JVM will cause a launch failure.
NULL
if none is configured.
|
virtual |
Returns the value of a -D
option (a system property) or NULL
if the option is undefined.
name | the property's name. |
|
virtual |
Returns the value of a -X
option (a generic JVM option) or NULL
if the option is undefined.
name | the option's name. |
|
virtual |
Returns the value of the -Xnoclassgc
option.
true
if the JVM will be configured to disable garbage collection of classes.
|
virtual |
Returns the opposite of the value of the -Xnoclassgc
option.
true
if the JVM will not be configured to disable garbage collection of classes.
|
virtual |
Returns the exit
callback that the JVM calls before exiting.
|
virtual |
Returns whether or not unrecognized initialization options are ignored or not.
|
virtual |
Returns the value of the incremental garbage collection option.
This method returns true
if the -Xincgc
commandline option would be used.
true
if the -Xincgc
options would be used.
|
virtual |
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.
jniVersion | the JNI version for which we want an initializing object. Different versions of JREs require different types of initialization types. The JNI version number is used to distinguish between the different requirements. Use 0x00010001 for JRE 1.1.x, 0x00010002 for JRE 1.2 and higher, 0x00010004 for JRE 1.4.x or higher. Using an unnecesarily small value will work, but it will restrict the runtime's ability to use more advanced JNI features. |
|
virtual |
Returns the value of the -Xint
option.
true
if the JVM will be configured to only support interpreted mode execution.
|
virtual |
Returns the configured JNI version.
The default value is 0x00010002 (65538), representing JRE 1.2.
|
virtual |
Returns the value of the garbage collection log file option.
This method returns the value of the -Xloggc
commandline option (null if the setting is not being used.)
NULL
or the name of the log file.
|
virtual |
Returns the value of the -Xmixed
option.
true
if the JVM will be configured to support mixed mode execution.
|
virtual |
Returns the configured module path.
|
virtual |
Allows the querying of a JVM option that is neither a -D nor a -X option.
name | the entire option, name and value together. |
|
virtual |
Returns the value of the -Xbootclasspath/p:
option.
NULL
if none is configured.
|
virtual |
Returns the classname of the application's security manager.
|
virtual |
Returns the filename of the application's security policy.
|
virtual |
Returns the configured JVM verbosity.
|
virtual |
Returns the vfprintf
callback that the JVM uses for reporting JVM information.
|
virtual |
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.
Since runtime version 3.7 this option supports a trailing asterisk and embedded environment variables in notation.
cp | an additional classpath root for the system classpath. |
|
virtual |
Prepends a string to the module path.
Prepending is implemented as appending the original module path 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.
mp | an additional classpath root for the module path. |
|
virtual |
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.
file | the configuration file that is to be read. This value may be NULL on Windows, but then the optional vers and conf arguments need to be provided. In the NULL case, the runtime is going to attempt reading the initialization values from the registry. In the non-NULL case, the configuration file may either be an old-style JunC++ion configuration file or a new-style .NET configuration file. The runtime is going to pick one based on the first character of the configuration file. If it is an '<', the .NET XML format is going to be expected, otherwise the old JunC++ion format is going to be expected. |
vers | an optional argument providing the old-style JunC++ion version number. This argument is required for registry-based and old-style JunC++ion based configuration. Always use "2.0" here. |
conf | an optional argument providing the old-style JunC++ion configuration name. This argument is required for registry-based and old-style JunC++ion based configuration. It represents your application's unique configuration identifier that allows multiple JunC++ion-enabled applications to co-reside on one host. |
reserved0 | an optional argument that should always be NULL. |
|
virtual |
Removes a -D
option (a system property) from the configuration.
name | the property's name. |
|
virtual |
Removes a -X
option (a generic JVM option) from the configuration.
name | the option's name. |
|
virtual |
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.
name | the entire option, name and value together. |
|
virtual |
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.
|
virtual |
Sets the callback that the JVM calls before
aborting.
ab | a persisted function pointer. |
|
virtual |
Sets the callback that the JVM calls before
aborting.
ab | a function pointer of type XMOG_ABORT. |
|
virtual |
Sets the value of the -Xbootclasspath/a:
option.
cp | the new append-bootclasspath. |
|
virtual |
Sets or clears the -Xbatch
option.
b | true if the -Xbatch option is to be used, false if not. |
|
virtual |
Sets or clears the -Xbatch
option.
b | "true" if the -Xbatch option is to be used, "false" if not. |
|
virtual |
Sets the value of the -Xbootclasspath:
option.
The bootclasspath has been removed from JVMs starting with Java9. You can still use the appendbootclasspath and the prepentbootclasspath settings. Using the bootclasspath with a Java9+ JVM will cause a launch failure.
cp | the new bootclasspath. |
|
virtual |
Sets or clears the -Xcheck:jni
option.
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.
cjni | true if the -Xcheck:jni option is to be used, false if not. |
|
virtual |
Sets or clears the -Xcheck:jni
option.
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.
cjni | "true" if the -Xcheck:jni option is to be used, "false" if not. |
|
virtual |
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 -cp
commandline option.
Since runtime version 3.7 this option supports a trailing asterisk and embedded environment variables in notation.
cp | the system classpath. |
|
virtual |
Sets a -D
option (a system property).
name | the property's name. |
value | the optional property value. Not every property has to have a value, some properties are useful just by virtue of being defined. |
|
virtual |
Sets a -X
option (a generic JVM option).
Most commonly used JVM options are available via more convenient wrapper functions, but you can use the option's raw name as well.
name | the option's name. |
value | the optional option value. If specified, the value is concatenated to the name to form the complete setting. Breaking the option into a name and a value allows the correct overriding of -X options with new values. |
|
virtual |
Sets or clears the -Xdebug
option.
d | true if the -Xdebug option is to be used, false if not. |
|
virtual |
Sets or clears the -Xdebug
option.
d | "true" if the -Xdebug option is to be used, "false" if not. |
|
virtual |
Sets the value of the -Xnoclassgc
option.
dcgc | true if the JVM will be configured to disable garbage collection of classes. |
|
virtual |
Sets the value of the -Xnoclassgc
option.
dcgc | "true" if the JVM will be configured to disable garbage collection of classes. |
|
virtual |
Sets the opposite of the value of the -Xnoclassgc
option.
ecgc | true if the JVM will not be configured to disable garbage collection of classes. |
|
virtual |
Sets the opposite of the value of the -Xnoclassgc
option.
ecgc | "true" if the JVM will not be configured to disable garbage collection of classes. |
|
virtual |
Sets the callback that the JVM calls before
exiting.
ex | a persisted function pointer. |
|
virtual |
Sets the callback that the JVM calls before
exiting.
ex | a function pointer of type XMOG_EXIT. |
|
virtual |
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 -Djava.ext.dirs
commandline option.
ed | the native library searchpath. |
|
virtual |
Sets or clears the -Xfuture
option.
future | true if the -Xfuture option is to be used, false if not. |
|
virtual |
Sets or clears the -Xfuture
option.
future | "true" if the -Xfuture option is to be used, "false" if not. |
|
virtual |
Sets whether or not unrecognized initialization options should be ignored or not.
If this is set to false
, an illegal configuration option will prevent the JVM from loading successfully. The default is true
.
|
virtual |
Sets whether or not unrecognized initialization options should be ignored or not.
If this is set to false
, an illegal configuration option will prevent the JVM from loading successfully. The default is "true"
.
ignore | legal values are "true" or "false" . |
|
virtual |
Enables or disables incremental garbage collection.
This method corresponds with the -Xincgc
commandline option.
i | true or false. |
|
virtual |
Enables or disables incremental garbage collection.
This method corresponds with the -Xincgc
commandline option.
i | "true" or "false". |
|
virtual |
Sets the initial heap size.
This method corresponds with the following implicit initialization mechanisms:
XMOG_INITIAL_HEAPSIZE
-Xms
in Java2 section of named configuration. InitialHeapSize
key in JVM settings section. ihs | the initial heap size as a string. The string format supports multipliers like 'm' or 'k', for example setInitialHeapSize( "4m" ); |
|
virtual |
Sets the initial heap size for Java threads in MB.
This method corresponds with the following implicit initialization mechanisms:
XMOG_INITIAL_HEAPSIZE
-Xms
in Java2 section of named configuration. InitialHeapSize
key in JVM settings section.
|
virtual |
Sets the value of the -Xint
option.
i | true if the JVM will be configured to only support interpreted mode execution. |
|
virtual |
Sets the value of the -Xint
option.
i | "true" if the JVM will be configured to only support interpreted mode execution. |
|
virtual |
Sets the JNI version that is going to be used (in JRE 1.2.x or higher only).
|
virtual |
Sets the JNI version that is going to be used (in JRE 1.2.x or higher only).
|
virtual |
Sets the path on which the JVM searches for native libraries.
This method should be avoided in deference to appendToLibraryPath() in order to avoid path separator portability issues and to allow configuration hooks to contribute to the configuration.
This method corresponds with the -Djava.library.path
commandline option.
lp | the native library searchpath. |
|
virtual |
Sets the log file used by the JVM.
This method corresponds with the -Xloggc:<file>
commandline option.
This is a JVM configuration option, not a framework configuration option. The framework tracing mechanism is unaffected by this setting.
file | the name of the log file. |
|
virtual |
Sets the maximum heap size.
This method corresponds with the following implicit initialization mechanisms:
XMOG_MAXIMUM_HEAPSIZE
-Xmx
in Java2 section of named configuration. MaximumHeapSize
key in JVM settings section. ihs | the initial heap size as a string. The string format supports multipliers like 'm' or 'k', for example setMaximumHeapSize( "4m" ); |
mhs | the maximum heapsize as a string. |
|
virtual |
Sets the maximum heap size in MB.
This method corresponds with the following implicit initialization mechanisms:
XMOG_MAXIMUM_HEAPSIZE
-Xmx
in Java2 section of named configuration. MaximumHeapSize
key in JVM settings section.
|
virtual |
Sets the value of the -Xmixed
option.
m | true if the JVM will be configured to support mixed mode execution. |
|
virtual |
Sets the value of the -Xmixed
option.
m | "true" if the JVM will be configured to support mixed mode execution. |
|
virtual |
Sets the module path.
This method should be avoided in deference to appendToModulePath() in order to avoid path separator portability issues and to allow configuration hooks to contribute to the module path configuration.
Passing NULL
to this method causes the module path option to be deleted.
This method corresponds with the –module-path
commandline option.
mp | the module path. |
|
virtual |
Sets or clears the -Xnoagent
option.
na | true if the -Xnoagent option is to be used, false if not. |
|
virtual |
Sets or clears the -Xnoagent
option.
na | "true" if the -Xnoagent option is to be used, "false" if not. |
|
virtual |
Allows the specification of a JVM option that is neither a -D nor a -X option.
namevalue | the entire option, name and value together. |
ptr | an extra value (corresponding with the JNI extraInfo field). |
|
virtual |
Sets the value of the -Xbootclasspath/p:
option.
cp | the new prepend-bootclasspath. |
|
virtual |
Sets the -Xprof
option if true
.
p | enables profiling mode if true . |
|
virtual |
Sets the -Xprof
option if "true"
.
p | enables profiling mode if "true" . |
|
virtual |
Sets or clears the -Xrs
option.
You usually won't need this option unless you're running your application as a daemon or service.
rs | true if the -Xrs option is to be used, false if not. |
|
virtual |
Sets or clears the -Xrs
option.
You usually won't need this option unless you're running your application as a daemon or service.
rs | "true" if the -Xrs option is to be used, "false" if not. |
|
virtual |
Sets the -Xrun
option.
runopts | the value of the option. |
|
virtual |
Sets the class that is the security manager for the application.
This method corresponds with the -Djava.security.manager
commandline option
sm | the classname of the type that will be used as security manager for the application. An empty string corresponds with the unparametrized -Djava.security.manager option and will result in the java.lang.SecurityManager being set. A NULL argument unsets the system property. |
|
virtual |
Sets the policy file containing security settings for the application.
This method corresponds with the -Djava.security.policy
commandline option
policyFile | the name of the file that contains the security settings for the application. A simple filename (without path) is expected to refer to a file in the present working directory. |
|
virtual |
Sets the stack size for Java threads.
ss | the stack size as a string. The string format supports multipliers like 'm' or 'k', for example setStackSize( "100k" ); |
|
virtual |
Sets the stack size for Java threads in kB.
This method corresponds with the following implicit initialization mechanisms:
XMOG_STACKSIZE
-Xss
in Java2 section of named configuration. StackSize
key in JVM settings section.
|
virtual |
Sets the vfprintf
callback that the JVM uses for reporting JVM information.
vfp | a persisted function pointer. |
|
virtual |
Sets the vfprintf
callback that the JVM uses for reporting JVM information.
vfp | a function pointer of type XMOG_VFPRINTF. |