JuggerNET Runtime Library v3.6.54.0  3.6.54.0
Public Member Functions | Properties | List of all members
Codemesh.JuggerNET.IJvmOptions Interface Reference

An interface which defines the options that can be configured for a JVM. More...

Inheritance diagram for Codemesh.JuggerNET.IJvmOptions:
Inheritance graph
[legend]

Public Member Functions

void AppendToClassPath (string cproot)
 Append a classpath root to the classpath. A classpath root is a directory or a jarfile or a zipfile. More...
 
void PrependToClassPath (string cproot)
 Prepend a classpath root to the classpath. A classpath root is a directory or a jarfile or a zipfile. More...
 
void AppendToBootClassPath (string cproot)
 Append a classpath root to the configured bootclasspath. A classpath root is a directory or a jarfile or a zipfile. More...
 
void PrependToBootClassPath (string cproot)
 Prepend a classpath root to the configured bootclasspath. A classpath root is a directory or a jarfile or a zipfile. More...
 
void AppendToLibraryPath (string libpathroot)
 Append a directory to the library search path. More...
 
void PrependToLibraryPath (string libpathroot)
 Prepend a directory to the librarypath. More...
 
void AppendToExtensionDirectories (string extdir)
 Appends a directory to the configured extensions directories. More...
 

Properties

string AgentLib [set]
 A property that corresponds with the Java5/6 -agentlib option. More...
 
string AgentPath [set]
 A property that corresponds with the Java5/6 -agentpath option. More...
 
string JavaAgent [set]
 A property that corresponds with the Java5/6 -agentpath option. More...
 
string Splash [set]
 A property that corresponds with the Java5/6 -splash option. More...
 
bool COMExceptionMessages [get, set]
 A property governing whether exception type, message, and stack trace are all bundled up in one XML message that is supplied as the exception's Message property. VB6 clients only have easy access to the message and this would provide all necesssary information if set to true. This property is set to false by default. More...
 
DashDOptionType DashDOption [get]
 The property that allows the specification of -D options. More...
 
DashXOptionType DashXOption [get]
 The property that allows the specification of -X options. More...
 
AbortCallback Abort [get, set]
 The callback for JVM abortion. More...
 
ExitCallback Exit [get, set]
 The callback for JVM exit. More...
 
VfprintfCallback Vfprintf [get, set]
 The callback for JVM print statements. More...
 
int JniVersion [get, set]
 The JNI Version number to be used for initialization of the JVM. This is synonymous to the JNILevel property. More...
 
int JNILevel [get, set]
 The JNI Version number to be used for initialization of the JVM. This is synonymous to the JniVersion property. More...
 
bool UseCodemeshSecurityManager [get, set]
 Governs whether a Codemesh SecurityManager is registered instead of the configured one. The Codemesh security manager delegates to the configured one in all but a few cases (the security privileges it needs granted to work). More...
 
bool IgnoreUnrecognized [get, set]
 Governs whether an unrecognized configuration option causes an JVM initialization error. More...
 
int StackSizeInKB [get, set]
 The stack size in KB used for the Java stack. This property is synonymous to the StackSize property. More...
 
int StackSize [get, set]
 The stack size in KB used for the Java stack. This property is synonymous to the StackSizeInKB property. More...
 
int InitialHeapSizeInMB [get, set]
 The initial JVM heap size in MB. This property is synonymous to the InitialHeapSize property. More...
 
int InitialHeapSize [get, set]
 The initial JVM heap size in MB. This property is synonymous to the InitialHeapSizeInMB property. More...
 
int MaximumHeapSizeInMB [get, set]
 The maximum JVM heap size in MB. This property is synonymous to the MaximumHeapSize property. More...
 
int MaximumHeapSize [get, set]
 The maximum JVM heap size in MB. This property is synonymous to the MaximumHeapSizeInMB property. More...
 
string ClassPath [get, set]
 The application classpath configured for the JVM. More...
 
string BootClassPath [get, set]
 The JVMs bootclasspath. More...
 
string AppendBootClassPath [get, set]
 The JVMs append-to-bootclasspath setting. More...
 
string PrependBootClassPath [get, set]
 The JVMs prepend-to-bootclasspath setting. More...
 
string LibraryPath [get, set]
 The application librarypath configured for the JVM. More...
 
string ExtensionDirectories [get, set]
 The extensions directory configured for the JVM. More...
 
string SecurityManager [get, set]
 The name of a Java class which acts as the security manager for the session. More...
 
Verbosity Verbose [get, set]
 The verbosity of the JVM. More...
 
string SecurityPolicy [get, set]
 The name of a file which contains the security policy for the session. More...
 
bool DisableClassGC [get, set]
 Disables class garbage collection if set to true. More...
 
bool EnableClassGC [get, set]
 Enables class garbage collection if set to true. More...
 
bool EnableVerboseGC [get, set]
 Enables verbose garbage collection if set to true. More...
 
bool MixedMode [get, set]
 Enables mixed execution mode if set to true. More...
 
bool InterpretedMode [get, set]
 Enables interpreted execution mode if set to true. More...
 
bool IncrementalGC [get, set]
 
string LogGCFile [get, set]
 
bool BatchMode [get, set]
 
bool Prof [get, set]
 Start the JVM with profiling support enabled if this property is true. More...
 
string Run [get, set]
 Specifies particular runtime settings that are used to configure the debugging or profiling support. More...
 
bool Debug [get, set]
 Start the embedded JVM in debug mode, allowing an external debugger to attach to it. More...
 
bool NoAgent [get, set]
 The Sun classic VM supports both the old sun.tools.debug interface and JPDA, the option "-Xdebug" enables both, but defaults to running the sun.tools.debug agent. The "-Xnoagent" turns this off so that JPDA will work. The HotSpot VM does not have this option. More...
 
bool ReduceSignals [get, set]
 Reduces usage of operating-system signals by Java virtual machine if set to true. More...
 
bool CheckJni [get, set]
 Performs additional validation on JNI calls if set to true. More...
 
bool Future [get, set]
 Performs strict class-file format checks if set to true.
More...
 

Detailed Description

An interface which defines the options that can be configured for a JVM.

Member Function Documentation

◆ AppendToBootClassPath()

void Codemesh.JuggerNET.IJvmOptions.AppendToBootClassPath ( string  cproot)

Append a classpath root to the configured bootclasspath. A classpath root is a directory or a jarfile or a zipfile.

Parameters
cprootA directory or a jarfile or a zipfile. When using direcotries, be sure to configure the class hierarchy's root directory, and not the directory in which the class of interest resides. For example: you want to make the class com.myfirm.MyClass available. Instead of configuring C:/temp/com/myfirm, you have to configure C:/temp.

Implemented in Codemesh.JuggerNET.JvmLoader.

◆ AppendToClassPath()

void Codemesh.JuggerNET.IJvmOptions.AppendToClassPath ( string  cproot)

Append a classpath root to the classpath. A classpath root is a directory or a jarfile or a zipfile.

Parameters
cprootA directory or a jarfile or a zipfile. When using direcotries, be sure to configure the class hierarchy's root directory, and not the directory in which the class of interest resides. For example: you want to make the class com.myfirm.MyClass available. Instead of configuring C:/temp/com/myfirm, you have to configure C:/temp.

Implemented in Codemesh.JuggerNET.JvmLoader.

◆ AppendToExtensionDirectories()

void Codemesh.JuggerNET.IJvmOptions.AppendToExtensionDirectories ( string  extdir)

Appends a directory to the configured extensions directories.

Parameters
extdirA directory to append to the list of extensions directories.

Implemented in Codemesh.JuggerNET.JvmLoader.

◆ AppendToLibraryPath()

void Codemesh.JuggerNET.IJvmOptions.AppendToLibraryPath ( string  libpathroot)

Append a directory to the library search path.

Parameters
libpathrootA directory in which the JVM will look for native libraries.

Implemented in Codemesh.JuggerNET.JvmLoader.

◆ PrependToBootClassPath()

void Codemesh.JuggerNET.IJvmOptions.PrependToBootClassPath ( string  cproot)

Prepend a classpath root to the configured bootclasspath. A classpath root is a directory or a jarfile or a zipfile.

Parameters
cprootA directory or a jarfile or a zipfile. When using direcotries, be sure to configure the class hierarchy's root directory, and not the directory in which the class of interest resides. For example: you want to make the class com.myfirm.MyClass available. Instead of configuring C:/temp/com/myfirm, you have to configure C:/temp.

Implemented in Codemesh.JuggerNET.JvmLoader.

◆ PrependToClassPath()

void Codemesh.JuggerNET.IJvmOptions.PrependToClassPath ( string  cproot)

Prepend a classpath root to the classpath. A classpath root is a directory or a jarfile or a zipfile.

Parameters
cprootA directory or a jarfile or a zipfile. When using direcotries, be sure to configure the class hierarchy's root directory, and not the directory in which the class of interest resides. For example: you want to make the class com.myfirm.MyClass available. Instead of configuring C:/temp/com/myfirm, you have to configure C:/temp.

Implemented in Codemesh.JuggerNET.JvmLoader.

◆ PrependToLibraryPath()

void Codemesh.JuggerNET.IJvmOptions.PrependToLibraryPath ( string  libpathroot)

Prepend a directory to the librarypath.

Parameters
libpathrootA directory in which the JVM will look for native libraries.

Implemented in Codemesh.JuggerNET.JvmLoader.

Property Documentation

◆ Abort

AbortCallback Codemesh.JuggerNET.IJvmOptions.Abort
getset

The callback for JVM abortion.

◆ AgentLib

string Codemesh.JuggerNET.IJvmOptions.AgentLib
set

A property that corresponds with the Java5/6 -agentlib option.

Available since version 3.3.13. You can set this option to a value that corresponds with the string following the -agentlib: switch. For example, the following assignment corresponds with the -agentlib:yjpagent setting:

loader.AgentLib = "yjpagent";

◆ AgentPath

string Codemesh.JuggerNET.IJvmOptions.AgentPath
set

A property that corresponds with the Java5/6 -agentpath option.

Available since version 3.3.13. You can set this option to a value that corresponds with the string following the -agentpath: switch. For example, the following assignment corresponds with the -agentpath:C:\temp\yjpagent.dll setting:

loader.AgentPath = "C:\\temp\\yjpagent.dll";

◆ AppendBootClassPath

string Codemesh.JuggerNET.IJvmOptions.AppendBootClassPath
getset

The JVMs append-to-bootclasspath setting.

This property corresponds with the Java -Xbootclasspath/a: option.

◆ BootClassPath

string Codemesh.JuggerNET.IJvmOptions.BootClassPath
getset

The JVMs bootclasspath.

This property corresponds with the Java -Xbootclasspath: option.

◆ CheckJni

bool Codemesh.JuggerNET.IJvmOptions.CheckJni
getset

Performs additional validation on JNI calls if set to true.

Setting this option can have a dramatic negative impact on performance, so only use it if you want to validate that all JNI-related operations are behaving as they should.

◆ ClassPath

string Codemesh.JuggerNET.IJvmOptions.ClassPath
getset

The application classpath configured for the JVM.

This property allows you to specify the entire application classpath for the embedded JVM. It might be preferable to use the AppendToClassPath() method because this method of setting a classpath will not overwrite any defaults that might have beed set by configuration hooks.

See also
IJvmOptions.AppendToClassPath, IJvmOptions.PrependToClassPath

◆ COMExceptionMessages

bool Codemesh.JuggerNET.IJvmOptions.COMExceptionMessages
getset

A property governing whether exception type, message, and stack trace are all bundled up in one XML message that is supplied as the exception's Message property. VB6 clients only have easy access to the message and this would provide all necesssary information if set to true. This property is set to false by default.

◆ DashDOption

DashDOptionType Codemesh.JuggerNET.IJvmOptions.DashDOption
get

The property that allows the specification of -D options.

Many -D options are available via more convenient properties.

The two lines that follow are totally equivalent and could be used in the same application:

loader.DashDOption[ "java.security.policy" ] = "c:\\temp\\policy.all";
loader.SecurityPolicy = "c:\\temp\\policy.all";

The second line will override the first line's value becaues internally the two lines result in the same property being set.

◆ DashXOption

DashXOptionType Codemesh.JuggerNET.IJvmOptions.DashXOption
get

The property that allows the specification of -X options.

Many -X options are available via more convenient properties.

The two lines that follow are totally equivalent and could be used in the same application:

loader.DashXOption[ "mx" ] = "256m";
loader.MaximumHeapSizeInMB = 256;

The second line will override the first line's value becaues internally the two lines result in the same property being set.

◆ Debug

bool Codemesh.JuggerNET.IJvmOptions.Debug
getset

Start the embedded JVM in debug mode, allowing an external debugger to attach to it.

You will have to consult your debugger's manual to find out what options it requires and you will also typically have to set a number of other options to make Java debugging work.

A typical set of options might look like this:

IJvmLoader loader = JvmLoader.GetLoader();
loader.Debug = true;
loader.NoAgent = true;
loader.DashDOption[ "java.compiler" ] = "NONE";
loader.Run = "jdwp:transport=dt_socket,server=y,address=8888,suspend=n";

where the value for the Run option depends on your JVM and your debugger.

◆ DisableClassGC

bool Codemesh.JuggerNET.IJvmOptions.DisableClassGC
getset

Disables class garbage collection if set to true.

This property corresponds with the Java -Xnoclassgc option.

See also
EnableClassGC

◆ EnableClassGC

bool Codemesh.JuggerNET.IJvmOptions.EnableClassGC
getset

Enables class garbage collection if set to true.

This property corresponds with removing the Java -Xnoclassgc option.

See also
DisableClassGC

◆ EnableVerboseGC

bool Codemesh.JuggerNET.IJvmOptions.EnableVerboseGC
getset

Enables verbose garbage collection if set to true.

This property corresponds with the Java -verbose:gc option.

◆ Exit

ExitCallback Codemesh.JuggerNET.IJvmOptions.Exit
getset

The callback for JVM exit.

◆ ExtensionDirectories

string Codemesh.JuggerNET.IJvmOptions.ExtensionDirectories
getset

The extensions directory configured for the JVM.

◆ Future

bool Codemesh.JuggerNET.IJvmOptions.Future
getset

Performs strict class-file format checks if set to true.

For purposes of backwards compatibility, the default format checks performed by the Java 2 SDK's virtual machine are no stricter than the checks performed by 1.1.x versions of the JDK software. The -Xfuture flag turns on stricter class-file format checks that enforce closer conformance to the class-file format specification. Developers are encouraged to use this flag when developing new code because the stricter checks will become the default in future releases of the Java application launcher.

Normally, by the time you're exposing your Java code to .NET, you should have done all Java testing and won't need to use this option anymore.

◆ IgnoreUnrecognized

bool Codemesh.JuggerNET.IJvmOptions.IgnoreUnrecognized
getset

Governs whether an unrecognized configuration option causes an JVM initialization error.

◆ InitialHeapSize

int Codemesh.JuggerNET.IJvmOptions.InitialHeapSize
getset

The initial JVM heap size in MB. This property is synonymous to the InitialHeapSizeInMB property.

This property corresponds with the Java -Xms option which is used to specify the initial size of the memory allocation pool. Choosing a value that's too large might make it impossible for the JVM to be loaded. Some JVMs (Sun 1.4.x for example) have a bug that will just terminate the process instead of returning an error code.

◆ InitialHeapSizeInMB

int Codemesh.JuggerNET.IJvmOptions.InitialHeapSizeInMB
getset

The initial JVM heap size in MB. This property is synonymous to the InitialHeapSize property.

This property corresponds with the Java -Xms option which is used to specify the initial size of the memory allocation pool. Choosing a value that's too large might make it impossible for the JVM to be loaded. Some JVMs (Sun 1.4.x for example) have a bug that will just terminate the process instead of returning an error code.

◆ InterpretedMode

bool Codemesh.JuggerNET.IJvmOptions.InterpretedMode
getset

Enables interpreted execution mode if set to true.

This property corresponds with the Java -Xint option. In interpreted mode, compilation to native code is disabled, and all bytecodes are executed by the interpreter. The performance benefits offered by the Java HotSpot VMs' adaptive compiler will not be present in this mode.

◆ JavaAgent

string Codemesh.JuggerNET.IJvmOptions.JavaAgent
set

A property that corresponds with the Java5/6 -agentpath option.

Available since version 3.3.13.

◆ JNILevel

int Codemesh.JuggerNET.IJvmOptions.JNILevel
getset

The JNI Version number to be used for initialization of the JVM. This is synonymous to the JniVersion property.

◆ JniVersion

int Codemesh.JuggerNET.IJvmOptions.JniVersion
getset

The JNI Version number to be used for initialization of the JVM. This is synonymous to the JNILevel property.

◆ LibraryPath

string Codemesh.JuggerNET.IJvmOptions.LibraryPath
getset

The application librarypath configured for the JVM.

This property corresponds with the Java -Djava.library.path= option.

◆ MaximumHeapSize

int Codemesh.JuggerNET.IJvmOptions.MaximumHeapSize
getset

The maximum JVM heap size in MB. This property is synonymous to the MaximumHeapSizeInMB property.

This property corresponds with the Java -Xmx option which is used to specify the maximum size of the memory allocation pool. Choosing a value that's too large might make it impossible for the JVM to be loaded. Some JVMs (Sun 1.4.x for example) have a bug that will just terminate the process instead of returning an error code.

◆ MaximumHeapSizeInMB

int Codemesh.JuggerNET.IJvmOptions.MaximumHeapSizeInMB
getset

The maximum JVM heap size in MB. This property is synonymous to the MaximumHeapSize property.

This property corresponds with the Java -Xmx option which is used to specify the maximum size of the memory allocation pool. Choosing a value that's too large might make it impossible for the JVM to be loaded. Some JVMs (Sun 1.4.x for example) have a bug that will just terminate the process instead of returning an error code.

◆ MixedMode

bool Codemesh.JuggerNET.IJvmOptions.MixedMode
getset

Enables mixed execution mode if set to true.

This property corresponds with the Java -Xmixed option.

◆ NoAgent

bool Codemesh.JuggerNET.IJvmOptions.NoAgent
getset

The Sun classic VM supports both the old sun.tools.debug interface and JPDA, the option "-Xdebug" enables both, but defaults to running the sun.tools.debug agent. The "-Xnoagent" turns this off so that JPDA will work. The HotSpot VM does not have this option.

◆ PrependBootClassPath

string Codemesh.JuggerNET.IJvmOptions.PrependBootClassPath
getset

The JVMs prepend-to-bootclasspath setting.

This property corresponds with the Java -Xbootclasspath/p: option.

◆ Prof

bool Codemesh.JuggerNET.IJvmOptions.Prof
getset

Start the JVM with profiling support enabled if this property is true.

See also
IJvmOptions.Run

◆ ReduceSignals

bool Codemesh.JuggerNET.IJvmOptions.ReduceSignals
getset

Reduces usage of operating-system signals by Java virtual machine if set to true.

The JVM catches signals to implement shutdown hooks for abnormal JVM termination. The JVM uses SIGHUP, SIGINT, and SIGTERM to initiate the running of shutdown hooks. The JVM uses SIGQUIT to perform thread dumps.

Applications that embed the JVM frequently need to trap signals like SIGINT or SIGTERM, and in such cases there is the possibility of interference between the applications' signal handlers and the JVM shutdown-hooks facility.

To avoid such interference, the -Xrs option can be used to turn off the JVM shutdown-hooks feature. When -Xrs is used, the signal masks for SIGINT, SIGTERM, SIGHUP, and SIGQUIT are not changed by the JVM, and signal handlers for these signals are not installed.

You typically need to set this option of you wish to run as a Windows Service because otherwise the JVM will terminate when your workstation suspends or logs you out.

◆ Run

string Codemesh.JuggerNET.IJvmOptions.Run
getset

Specifies particular runtime settings that are used to configure the debugging or profiling support.

See also
IJvmOptions.Debug, IJvmOptions.Prof

◆ SecurityManager

string Codemesh.JuggerNET.IJvmOptions.SecurityManager
getset

The name of a Java class which acts as the security manager for the session.

This property corresponds with the Java -Djava.security.manager= option.

◆ SecurityPolicy

string Codemesh.JuggerNET.IJvmOptions.SecurityPolicy
getset

The name of a file which contains the security policy for the session.

This property corresponds with the Java -Djava.security.policy= option.

◆ Splash

string Codemesh.JuggerNET.IJvmOptions.Splash
set

A property that corresponds with the Java5/6 -splash option.

Available since version 3.3.13.

◆ StackSize

int Codemesh.JuggerNET.IJvmOptions.StackSize
getset

The stack size in KB used for the Java stack. This property is synonymous to the StackSizeInKB property.

Each Java thread has two stacks: one for Java code and one for C code. The -Xss option sets the maximum stack size that can be used by C code in a thread. Every thread that is spawned by the JVM during the execution of the program has this value as its C stack size.

◆ StackSizeInKB

int Codemesh.JuggerNET.IJvmOptions.StackSizeInKB
getset

The stack size in KB used for the Java stack. This property is synonymous to the StackSize property.

Each Java thread has two stacks: one for Java code and one for C code. The -Xss option sets the maximum stack size that can be used by C code in a thread. Every thread that is spawned by the JVM during the execution of the program has this value as its C stack size.

◆ UseCodemeshSecurityManager

bool Codemesh.JuggerNET.IJvmOptions.UseCodemeshSecurityManager
getset

Governs whether a Codemesh SecurityManager is registered instead of the configured one. The Codemesh security manager delegates to the configured one in all but a few cases (the security privileges it needs granted to work).

◆ Verbose

Verbosity Codemesh.JuggerNET.IJvmOptions.Verbose
getset

The verbosity of the JVM.

◆ Vfprintf

VfprintfCallback Codemesh.JuggerNET.IJvmOptions.Vfprintf
getset

The callback for JVM print statements.


The documentation for this interface was generated from the following file:

Copyright (c) 1999-2020 by Codemesh, Inc., ALL RIGHTS RESERVED.