JuggerNET Runtime Library v3.6.54.0  3.6.54.0
Public Member Functions | Static Public Member Functions | Static Protected Attributes | Properties | List of all members
Codemesh.JuggerNET.JvmLoader Class Reference

The class that acts as a factory for JVM instances. More...

Inheritance diagram for Codemesh.JuggerNET.JvmLoader:
Inheritance graph
[legend]
Collaboration diagram for Codemesh.JuggerNET.JvmLoader:
Collaboration graph
[legend]

Public Member Functions

void Read (string file)
 Explicitly updates the instance with configuration information from the specified configuration file. More...
 
void Read (string vers, string conf, string reserved0)
 Explicitly updates the instance with configuration information from the registry. More...
 
void Read (string file, string vers, string conf, string reserved0)
 Explicitly updates the instance with configuration information from the specified source. More...
 
IJvm Load ()
 Attempts to load a JVM using the configured settings. This version of the Load() method accepts a preloaded JVM. This method will throw a JuggerNETFrameworkException if a registered config hook causes an exception to be thrown. The root exception is maintained by the JuggerNETFrameworkException. More...
 
IJvm Load (bool bAcceptPreloaded)
 Attempts to load a JVM using the configured settings or optionally uses an already loaded JVM. This method will throw a JuggerNETFrameworkException if a registered config hook causes an exception to be thrown. The root exception is maintained by the JuggerNETFrameworkException. More...
 
void UnloadCleanup (IJvm jvm)
 An internally used method that removes the reference to the loaded Jvm. This does not actually unload the JVM (use Jvm.Destroy() for that purpose). More...
 
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...
 
void AppendToModulePath (string cproot)
 Append a modulepath root to the modulepath. A modulepath root is usually a directory or a jarfile or a zipfile. More...
 
void PrependToModulePath (string cproot)
 Prepend a modulepath root to the modulepath. A modulepath root is usually a directory or a jarfile or a zipfile. More...
 
void SetTraceLevel (TraceFacility fac, TraceLevel level)
 Set the trace level for a trace facility. More...
 
TraceLevel GetTraceLevel (TraceFacility fac)
 Query the trace level for a trace facility. More...
 
void SetTraceFile (string name, int numFilesToRetain)
 Sets both the trace file name and the number of old files to retain in one operation. More...
 

Static Public Member Functions

static void RegisterConfigurationHook (ConfigurationHook hook)
 Registers a configuration hook with the runtime library. More...
 
static void SetConfigFile (string configFile)
 Specifies the location of an XML file that will be used by the native runtime library to read configuration information. This call is not necessary if you are following the .NET naming conventions for configuration files because the .NET runtime will find and parse the contents automatically. More...
 
static void SetConfigFile (string configFile, string vers, string conf, string reserved)
 Specifies the location of an XML or old-style JunC++ion file that will be used by the native runtime library to read configuration information. This call is not necessary if you are following the .NET naming conventions for configuration files because the .NET runtime will find and parse the contents automatically. If the last three arguments are null, an XML file will be expected, otherwise an old-style JunC++ion configuration file will be expected. More...
 
static IJvmLoader GetJvmLoader ()
 Returns an already created JVM Loader instance or a newly created JVM loader that traces errors and accepts environment variable overrides as well as a default JVM. More...
 
static IJvmLoader GetJvmLoader (TraceFacility fac, TraceLevel level)
 Returns an already created JVM Loader instance or a newly created JVM loader that traces at the specified level and accepts environment variable overrides as well as a default JVM. More...
 
static IJvmLoader GetJvmLoader (bool bEnvOverrides, bool bDefaultJvm)
 Returns an already created JVM Loader instance or a newly created JVM loader that traces errors and accepts environment variable overrides as well as a default JVM. More...
 
static IJvmLoader GetJvmLoader (bool bEnvOverrides, bool bDefaultJvm, TraceFacility fac, TraceLevel level)
 Returns an already created JVM Loader instance or a newly created JVM loader that uses the given settings. More...
 
static IJvmLoader GetJvmLoader (string configFile, bool bEnvOverrides, bool bDefaultJvm, TraceFacility fac, TraceLevel level)
 Returns an already created JVM Loader instance or a newly created JVM loader that uses the given settings. This is a less common factory method in .NET than in C++ because .NET can locate configuration files automatically and the automatic mechanism should be used if possible. More...
 
static IJvmLoader GetJvmLoader (string configFile, bool bEnvOverrides, bool bDefaultJvm)
 Returns an already created JVM Loader instance or a newly created JVM loader that uses the given settings. This is a less common factory method in .NET than in C++ because .NET can locate configuration files automatically and the automatic mechanism should be used if possible. More...
 
static IJvmLoader GetJvmLoader (string configFile, string vers, string conf, string reserved, bool bEnvOverrides, bool bDefaultJvm, TraceFacility fac, TraceLevel level)
 Returns an already created JVM Loader instance or a newly created JVM loader that uses the given settings. This is a very uncommon factory method in .NET as it provides access to the old-style JunC++ion configuration method. Other factories should be used as a preference and this factory is just provided for completeness' sake. More...
 
static IJvmLoader GetJvmLoader (string configFile, string vers, string conf, string reserved, bool bEnvOverrides, bool bDefaultJvm)
 Returns an already created JVM Loader instance or a newly created JVM loader that uses the given settings. This is a very uncommon factory method in .NET as it provides access to the old-style JunC++ion configuration method. Other factories should be used as a preference and this factory is just provided for completeness' sake. More...
 
static IJvmLoader GetJvmLoader (string vers, string conf, string reserved, bool bEnvOverrides, bool bDefaultJvm, TraceFacility fac, TraceLevel level)
 Returns an already created JVM Loader instance or a newly created JVM loader that uses the given settings. This is a very uncommon factory method in .NET as it provides access to the old-style JunC++ion configuration method which uses the Windows registry to contain configuration data. Other factories should be used as a preference and this factory is just provided for completeness' sake. More...
 

Static Protected Attributes

static ConfigurationHook theConfigHook = null
 

Properties

static IJvmLoader JvmLoaderIfCreated [get]
 A property giving access to an already created JvmLoader without creating one. This property allows you to query whether a JvmLoader has already been created. More...
 
IJvm JvmIfCreated [get]
 A property giving access to an already created Jvm without creating one. This property allows you to query whether a Jvm has already been loaded via the JvmLoader API. More...
 
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...
 
string ModulePath [get, set]
 The application modulepath configured for the JVM. More...
 
ExceptionHandlerCallback ExceptionHandler [get, set]
 
string? SkipTypeAnalysisForTheseAssemblies [get, set]
 
string? PerformTypeAnalysisForTheseAssemblies [get, set]
 
string JvmPath [get, set]
 The JVM that is to be used in in-process mode. This is the full path to a file which is usually called jvm.dll and is in a subdirectory of the Java Runtime Environment (JRE). More...
 
string DefaultJvmPath [get]
 The JVM that would be selected by the runtime library to be used in in-process mode if no JvmPath is specified explicitly. This is the full path to a file which is usually called jvm.dll and is in a subdirectory of a Java Runtime Environment (JRE). This is a read-only property that allows you to query the choice made by the runtime. More...
 
bool NoshutdownProcessing [get, set]
 Governs whether the application should attempt to perform cleanup in the JVM when shutting down. This defaults to false, but some applications may require setting this property to true if they experience shutdown crashes. More...
 
string TraceFile [get, set]
 A file into which trace messages are written. If not specified, all tracing output is going to stdout. More...
 
int TraceFileCount [get, set]
 The number of old trace files to retain. More...
 
TraceCallback TraceMethod [get, set]
 Allows you to register a custom tracing method. More...
 
bool Remote [get, set]
 
int NumObjectsToForcedGC [get, set]
 Specifies the number of prxoy objects that need to be instantiated before a forced garbage collection takes place to alleviate memory pressure on the Java heap. The default value is 10,000. A value of 0 disables forced garbage collection. More...
 
int MilliSecondsToForcedGC [get, set]
 Specifies the number of milliseconds between forced garbage collections to alleviate memory pressure on the Java heap. The default value is 1000. A value of 0 disables forced garbage collection. More...
 
bool JniFallback [get, set]
 
string MainClass [get, set]
 
string Authentication [get, set]
 
string Encryption [get, set]
 
string Connection [get, set]
 
string ClassPathAnalysis [get]
 A property that can be used to analyze the classpath. The returned string contains useful cleartext feedback on the correctness of configured classpath roots. More...
 
string ClassesAnalysis [get]
 A property that can be used to analyze the proxy classes. The returned string contains useful cleartext feedback on the availability of Java types for present proxy types. More...
 
string MethodsAndFieldsAnalysis [get]
 A property that can be used to analyze the inner structure of proxy classes. The returned string contains useful cleartext feedback on the availability of Java fields and methods for present proxy type field and method elements. More...
 
- Properties inherited from Codemesh.JuggerNET.IJvmLoader
IJvm JvmIfCreated [get]
 A property giving access to an already created Jvm without creating one. This property allows you to query whether a Jvm has already been loaded via the JvmLoader API. More...
 
string ClassPathAnalysis [get]
 A property that can be used to analyze the classpath. The returned string contains useful cleartext feedback on the correctness of configured classpath roots. More...
 
string ClassesAnalysis [get]
 A property that can be used to analyze the proxy classes. The returned string contains useful cleartext feedback on the availability of Java types for present proxy types. More...
 
string MethodsAndFieldsAnalysis [get]
 A property that can be used to analyze the inner structure of proxy classes. The returned string contains useful cleartext feedback on the availability of Java fields and methods for present proxy type field and method elements. More...
 
- Properties inherited from Codemesh.JuggerNET.IJvmOptions
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...
 
- Properties inherited from Codemesh.JuggerNET.IOptions
string JvmPath [get, set]
 The JVM that is to be used in in-process mode. This is the full path to a file which is usually called jvm.dll and is in a subdirectory of the Java Runtime Environment (JRE). More...
 
string DefaultJvmPath [get]
 The JVM that would be selected by the runtime library to be used in in-process mode if no JvmPath is specified explicitly. This is the full path to a file which is usually called jvm.dll and is in a subdirectory of a Java Runtime Environment (JRE). This is a read-only property that allows you to query the choice made by the runtime. More...
 
bool NoshutdownProcessing [get, set]
 Governs whether the application should attempt to perform cleanup in the JVM when shutting down. This defaults to false, but some applications may require setting this property to true if they experience shutdown crashes. More...
 
string TraceFile [get, set]
 A file into which trace messages are written. If not specified, all tracing output is going to stdout. More...
 
int TraceFileCount [get, set]
 The number of old trace files to retain. More...
 
TraceCallback TraceMethod [get, set]
 Allows you to register a custom tracing method. More...
 
bool Remote [get, set]
 Specifies whether to use in-process or out-of-process runtime mode. If you use a value of true here, you will need to configure at least the IRemoteOptions.ConnectionString property. More...
 
int MilliSecondsToForcedGC [get, set]
 Specifies the number of milliseconds between forced garbage collections to alleviate memory pressure on the Java heap. The default value is 1000. A value of 0 disables forced garbage collection. More...
 
int NumObjectsToForcedGC [get, set]
 Specifies the number of prxoy objects that need to be instantiated before a forced garbage collection takes place to alleviate memory pressure on the Java heap. The default value is 10,000. A value of 0 disables forced garbage collection. More...
 
string SkipTypeAnalysisForTheseAssemblies [get, set]
 Specifies semicolon-separated list of assembly name fragments that refer to assemblies that should be skipped during proxy type analysis. More...
 
string PerformTypeAnalysisForTheseAssemblies [get, set]
 Specifies semicolon-separated list of assembly name fragments that refer to assemblies that are the only assemblies that are to be analyzed for the presence of proxy types. More...
 
ExceptionHandlerCallback ExceptionHandler [get, set]
 Specifies the callback that you can use to customize the type of exception that is thrown by the JuggerNET framework. More...
 
- Properties inherited from Codemesh.JuggerNET.IRemoteOptions
bool JniFallback [get, set]
 Attempts to fall back to JNI in-proces mode if no connection with a shared JVM can be established if this property is true. More...
 
string MainClass [get, set]
 Not yet used. More...
 
string Authentication [get, set]
 Not yet used. More...
 
string Encryption [get, set]
 Not yet used. More...
 
string Connection [get, set]
 Specifies the connection settings for a shared JVM. More...
 

Detailed Description

The class that acts as a factory for JVM instances.

This class implements the basic API for explicitly configuring the way the .NET process tries to hook up with a Java virtual machine. Remember that we don't translate Java to .NET, we bridge it. This means that at runtime your .NET types need to be able to find their corresponding Java types. Even though there are several ways you can hide the configuration details from application programmers, we recommend that you have one well defined point in your application where you attempt to connect to the Java side, detect configuration errors, and handle any problems that might have occured.

This will usually look something like this:

IJvmLoader loader = JvmLoader.GetJvmLoader();
IJvm jvm = null;
try
{
if( loader.JvmPath == null )
loader.JvmPath = @"..\jre\bin\client\jvm.dll";
loader.AppendToClassPath( @"c:\temp\myclasses.jar" );
if( loader.MaximumHeapSize < 256 )
loader.MaximumHeapSize = 256;
jvm = loader.Load();
}
catch( System.Exception se )
{
Console.WriteLine( "JVM couldn't be loaded: {0}", se.ToString() );
}
try
{
if( jvm != null )
Class.ForName( "com.myfirm.util.MyType" );
}
catch( System.Exception se )
{
Console.WriteLine( "Missing jarfile: {0}", se.Message );
}

In this example, we acquire a loader instance and configure some Java options. Notice how we use a pattern which allows the setting of default values via different configuration mechanisms. If a JvmPath is already configured, we don't reconfigure it; if a maximum Java heapsize of more than 256MB is already configured, we don't override it. Once everything is configured, we attempt to load the JVM and handle any errors that might occur at that point. If we succeeded, we attempt to load a class that we know to be required. This is a great sanity check to perform at runtime because hard-to-diagnose classpath misconfigurations (or missing jarfiles) get caught early on and don't turn into bigger problems later on.

The IJvmLoader interface aggregates the IJvmOptions, IOptions, and IRemoteOptions interfaces, which all provide configuration properties for different purposes. The JvmLoader class implements the IJvmOptions interface.

Member Function Documentation

◆ AppendToBootClassPath()

void Codemesh.JuggerNET.JvmLoader.AppendToBootClassPath ( string  cproot)
inline

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.

Implements Codemesh.JuggerNET.IJvmOptions.

◆ AppendToClassPath()

void Codemesh.JuggerNET.JvmLoader.AppendToClassPath ( string  cproot)
inline

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.

Implements Codemesh.JuggerNET.IJvmOptions.

◆ AppendToExtensionDirectories()

void Codemesh.JuggerNET.JvmLoader.AppendToExtensionDirectories ( string  extdir)
inline

Appends a directory to the configured extensions directories.

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

Implements Codemesh.JuggerNET.IJvmOptions.

◆ AppendToLibraryPath()

void Codemesh.JuggerNET.JvmLoader.AppendToLibraryPath ( string  libpathroot)
inline

Append a directory to the library search path.

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

Implements Codemesh.JuggerNET.IJvmOptions.

◆ AppendToModulePath()

void Codemesh.JuggerNET.JvmLoader.AppendToModulePath ( string  cproot)
inline

Append a modulepath root to the modulepath. A modulepath root is usually 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.

<since>netrt v3.6</since>

◆ GetJvmLoader() [1/9]

static IJvmLoader Codemesh.JuggerNET.JvmLoader.GetJvmLoader ( )
inlinestatic

◆ GetJvmLoader() [2/9]

static IJvmLoader Codemesh.JuggerNET.JvmLoader.GetJvmLoader ( bool  bEnvOverrides,
bool  bDefaultJvm 
)
inlinestatic

Returns an already created JVM Loader instance or a newly created JVM loader that traces errors and accepts environment variable overrides as well as a default JVM.

Parameters
bEnvOverridesallow environment variable overrides.
bDefaultJvmuse a default JVM if none is specified.
Returns

References Codemesh.JuggerNET.JvmLoader.GetJvmLoader().

◆ GetJvmLoader() [3/9]

static IJvmLoader Codemesh.JuggerNET.JvmLoader.GetJvmLoader ( bool  bEnvOverrides,
bool  bDefaultJvm,
TraceFacility  fac,
TraceLevel  level 
)
inlinestatic

Returns an already created JVM Loader instance or a newly created JVM loader that uses the given settings.

Parameters
bEnvOverridesallow environment variable overrides.
bDefaultJvmuse a default JVM if none is specified.
facthe tracing facility(ies) for which we specify the tracing level.
levelthe tracing level.
Returns

References Codemesh.JuggerNET.IOptions.MilliSecondsToForcedGC, Codemesh.JuggerNET.IOptions.NumObjectsToForcedGC, and Codemesh.JuggerNET.IOptions.SetTraceLevel().

◆ GetJvmLoader() [4/9]

static IJvmLoader Codemesh.JuggerNET.JvmLoader.GetJvmLoader ( string  configFile,
bool  bEnvOverrides,
bool  bDefaultJvm 
)
inlinestatic

Returns an already created JVM Loader instance or a newly created JVM loader that uses the given settings. This is a less common factory method in .NET than in C++ because .NET can locate configuration files automatically and the automatic mechanism should be used if possible.

Parameters
configFilethe configuration file to be used.
bEnvOverridesallow environment variable overrides.
bDefaultJvmuse a default JVM if none is specified.
Returns

References Codemesh.JuggerNET.JvmLoader.GetJvmLoader().

◆ GetJvmLoader() [5/9]

static IJvmLoader Codemesh.JuggerNET.JvmLoader.GetJvmLoader ( string  configFile,
bool  bEnvOverrides,
bool  bDefaultJvm,
TraceFacility  fac,
TraceLevel  level 
)
inlinestatic

Returns an already created JVM Loader instance or a newly created JVM loader that uses the given settings. This is a less common factory method in .NET than in C++ because .NET can locate configuration files automatically and the automatic mechanism should be used if possible.

Parameters
configFilethe configuration file to be used.
bEnvOverridesallow environment variable overrides.
bDefaultJvmuse a default JVM if none is specified.
facthe tracing facility(ies) for which we specify the tracing level.
levelthe tracing level.
Returns

References Codemesh.JuggerNET.IOptions.MilliSecondsToForcedGC, Codemesh.JuggerNET.IOptions.NumObjectsToForcedGC, Codemesh.JuggerNET.IJvmLoader.Read(), and Codemesh.JuggerNET.IOptions.SetTraceLevel().

◆ GetJvmLoader() [6/9]

static IJvmLoader Codemesh.JuggerNET.JvmLoader.GetJvmLoader ( string  configFile,
string  vers,
string  conf,
string  reserved,
bool  bEnvOverrides,
bool  bDefaultJvm 
)
inlinestatic

Returns an already created JVM Loader instance or a newly created JVM loader that uses the given settings. This is a very uncommon factory method in .NET as it provides access to the old-style JunC++ion configuration method. Other factories should be used as a preference and this factory is just provided for completeness' sake.

Parameters
configFilethe configuration file to be used.
versthe verswion number of the configuration section.
confthe configuration name.
reservedshould be NULL.
bEnvOverridesallow environment variable overrides.
bDefaultJvmuse a default JVM if none is specified.
Returns

References Codemesh.JuggerNET.JvmLoader.GetJvmLoader().

◆ GetJvmLoader() [7/9]

static IJvmLoader Codemesh.JuggerNET.JvmLoader.GetJvmLoader ( string  configFile,
string  vers,
string  conf,
string  reserved,
bool  bEnvOverrides,
bool  bDefaultJvm,
TraceFacility  fac,
TraceLevel  level 
)
inlinestatic

Returns an already created JVM Loader instance or a newly created JVM loader that uses the given settings. This is a very uncommon factory method in .NET as it provides access to the old-style JunC++ion configuration method. Other factories should be used as a preference and this factory is just provided for completeness' sake.

Parameters
configFilethe configuration file to be used.
versthe verswion number of the configuration section.
confthe configuration name.
reservedshould be NULL.
bEnvOverridesallow environment variable overrides.
bDefaultJvmuse a default JVM if none is specified.
facthe tracing facility(ies) for which we specify the tracing level.
levelthe tracing level.
Returns

References Codemesh.JuggerNET.IOptions.MilliSecondsToForcedGC, Codemesh.JuggerNET.IOptions.NumObjectsToForcedGC, Codemesh.JuggerNET.IJvmLoader.Read(), and Codemesh.JuggerNET.IOptions.SetTraceLevel().

◆ GetJvmLoader() [8/9]

static IJvmLoader Codemesh.JuggerNET.JvmLoader.GetJvmLoader ( string  vers,
string  conf,
string  reserved,
bool  bEnvOverrides,
bool  bDefaultJvm,
TraceFacility  fac,
TraceLevel  level 
)
inlinestatic

Returns an already created JVM Loader instance or a newly created JVM loader that uses the given settings. This is a very uncommon factory method in .NET as it provides access to the old-style JunC++ion configuration method which uses the Windows registry to contain configuration data. Other factories should be used as a preference and this factory is just provided for completeness' sake.

Parameters
versthe verswion number of the configuration section.
confthe configuration name.
reservedshould be NULL.
bEnvOverridesallow environment variable overrides.
bDefaultJvmuse a default JVM if none is specified.
facthe tracing facility(ies) for which we specify the tracing level.
levelthe tracing level.
Returns

References Codemesh.JuggerNET.IOptions.MilliSecondsToForcedGC, Codemesh.JuggerNET.IOptions.NumObjectsToForcedGC, and Codemesh.JuggerNET.IOptions.SetTraceLevel().

◆ GetJvmLoader() [9/9]

static IJvmLoader Codemesh.JuggerNET.JvmLoader.GetJvmLoader ( TraceFacility  fac,
TraceLevel  level 
)
inlinestatic

Returns an already created JVM Loader instance or a newly created JVM loader that traces at the specified level and accepts environment variable overrides as well as a default JVM.

Parameters
facthe facility for which we're setting the level
levelthe tracing level
Returns

References Codemesh.JuggerNET.JvmLoader.GetJvmLoader().

◆ GetTraceLevel()

TraceLevel Codemesh.JuggerNET.JvmLoader.GetTraceLevel ( TraceFacility  fac)
inline

Query the trace level for a trace facility.

Parameters
facThe trace facility for which we want to know the current trace level.
Returns

Implements Codemesh.JuggerNET.IOptions.

◆ Load() [1/2]

IJvm Codemesh.JuggerNET.JvmLoader.Load ( )
inline

Attempts to load a JVM using the configured settings. This version of the Load() method accepts a preloaded JVM. This method will throw a JuggerNETFrameworkException if a registered config hook causes an exception to be thrown. The root exception is maintained by the JuggerNETFrameworkException.

Returns
a Jvm instance or throws an exception if something went wrong.

Implements Codemesh.JuggerNET.IJvmLoader.

◆ Load() [2/2]

IJvm Codemesh.JuggerNET.JvmLoader.Load ( bool  bAcceptPreloaded)
inline

Attempts to load a JVM using the configured settings or optionally uses an already loaded JVM. This method will throw a JuggerNETFrameworkException if a registered config hook causes an exception to be thrown. The root exception is maintained by the JuggerNETFrameworkException.

Parameters
bAcceptPreloadedtrue if an already loaded JVM is OK to use.
Returns
a Jvm instance or throws an exception if something went wrong.

Implements Codemesh.JuggerNET.IJvmLoader.

◆ PrependToBootClassPath()

void Codemesh.JuggerNET.JvmLoader.PrependToBootClassPath ( string  cproot)
inline

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.

Implements Codemesh.JuggerNET.IJvmOptions.

◆ PrependToClassPath()

void Codemesh.JuggerNET.JvmLoader.PrependToClassPath ( string  cproot)
inline

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.

Implements Codemesh.JuggerNET.IJvmOptions.

◆ PrependToLibraryPath()

void Codemesh.JuggerNET.JvmLoader.PrependToLibraryPath ( string  libpathroot)
inline

Prepend a directory to the librarypath.

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

Implements Codemesh.JuggerNET.IJvmOptions.

◆ PrependToModulePath()

void Codemesh.JuggerNET.JvmLoader.PrependToModulePath ( string  cproot)
inline

Prepend a modulepath root to the modulepath. A modulepath root is usually 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.

<since>netrt v3.6</since>

◆ Read() [1/3]

void Codemesh.JuggerNET.JvmLoader.Read ( string  file)
inline

Explicitly updates the instance with configuration information from the specified configuration file.

Parameters
filethe configuration file to be used.

Implements Codemesh.JuggerNET.IJvmLoader.

◆ Read() [2/3]

void Codemesh.JuggerNET.JvmLoader.Read ( string  file,
string  vers,
string  conf,
string  reserved0 
)
inline

Explicitly updates the instance with configuration information from the specified source.

Parameters
filethe configuration file to be used. May be null to represent the registry.
versthe version of the named configuration to be used. May be null.
confthe name of the named configuration to be used. May be null.
reserved0Must be null.

Implements Codemesh.JuggerNET.IJvmLoader.

◆ Read() [3/3]

void Codemesh.JuggerNET.JvmLoader.Read ( string  vers,
string  conf,
string  reserved0 
)
inline

Explicitly updates the instance with configuration information from the registry.

Parameters
versthe version of the named configuration to be used. May be null.
confthe name of the named configuration to be used. May be null.
reserved0Must be null.

Implements Codemesh.JuggerNET.IJvmLoader.

◆ RegisterConfigurationHook()

static void Codemesh.JuggerNET.JvmLoader.RegisterConfigurationHook ( ConfigurationHook  hook)
inlinestatic

Registers a configuration hook with the runtime library.

Parameters
hookthe configuration hook that will be invoked at certain times.

◆ SetConfigFile() [1/2]

static void Codemesh.JuggerNET.JvmLoader.SetConfigFile ( string  configFile)
inlinestatic

Specifies the location of an XML file that will be used by the native runtime library to read configuration information. This call is not necessary if you are following the .NET naming conventions for configuration files because the .NET runtime will find and parse the contents automatically.

Parameters
configFilethe file containing runtime configuration information.

Referenced by Codemesh.JuggerNET.JvmLoaderFactory.SetConfigFile().

◆ SetConfigFile() [2/2]

static void Codemesh.JuggerNET.JvmLoader.SetConfigFile ( string  configFile,
string  vers,
string  conf,
string  reserved 
)
inlinestatic

Specifies the location of an XML or old-style JunC++ion file that will be used by the native runtime library to read configuration information. This call is not necessary if you are following the .NET naming conventions for configuration files because the .NET runtime will find and parse the contents automatically. If the last three arguments are null, an XML file will be expected, otherwise an old-style JunC++ion configuration file will be expected.

Parameters
configFile
vers
conf
reserved

◆ SetTraceFile()

void Codemesh.JuggerNET.JvmLoader.SetTraceFile ( string  name,
int  numFilesToRetain 
)
inline

Sets both the trace file name and the number of old files to retain in one operation.

Parameters
nameThe trace file name.
numFilesToRetainThe number of old trace files to retain.

Implements Codemesh.JuggerNET.IOptions.

References Codemesh.JuggerNET.JvmLoader.TraceFile, and Codemesh.JuggerNET.JvmLoader.TraceFileCount.

◆ SetTraceLevel()

void Codemesh.JuggerNET.JvmLoader.SetTraceLevel ( TraceFacility  fac,
TraceLevel  level 
)
inline

Set the trace level for a trace facility.

Parameters
facThe trace facility(s) for which we're applying a trace level.
levelThe trace level we're applying.

Implements Codemesh.JuggerNET.IOptions.

◆ UnloadCleanup()

void Codemesh.JuggerNET.JvmLoader.UnloadCleanup ( IJvm  jvm)
inline

An internally used method that removes the reference to the loaded Jvm. This does not actually unload the JVM (use Jvm.Destroy() for that purpose).

Parameters
jvmThe JVM that is being destroyed.

Implements Codemesh.JuggerNET.IJvmLoader.

Property Documentation

◆ Abort

AbortCallback Codemesh.JuggerNET.JvmLoader.Abort
getset

The callback for JVM abortion.

◆ AgentLib

string Codemesh.JuggerNET.JvmLoader.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.JvmLoader.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.JvmLoader.AppendBootClassPath
getset

The JVMs append-to-bootclasspath setting.

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

◆ BootClassPath

string Codemesh.JuggerNET.JvmLoader.BootClassPath
getset

The JVMs bootclasspath.

This property corresponds with the Java -Xbootclasspath: option.

◆ CheckJni

bool Codemesh.JuggerNET.JvmLoader.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.

◆ ClassesAnalysis

string Codemesh.JuggerNET.JvmLoader.ClassesAnalysis
get

A property that can be used to analyze the proxy classes. The returned string contains useful cleartext feedback on the availability of Java types for present proxy types.

◆ ClassPath

string Codemesh.JuggerNET.JvmLoader.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

◆ ClassPathAnalysis

string Codemesh.JuggerNET.JvmLoader.ClassPathAnalysis
get

A property that can be used to analyze the classpath. The returned string contains useful cleartext feedback on the correctness of configured classpath roots.

◆ COMExceptionMessages

bool Codemesh.JuggerNET.JvmLoader.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.JvmLoader.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.JvmLoader.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.JvmLoader.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.

◆ DefaultJvmPath

string Codemesh.JuggerNET.JvmLoader.DefaultJvmPath
get

The JVM that would be selected by the runtime library to be used in in-process mode if no JvmPath is specified explicitly. This is the full path to a file which is usually called jvm.dll and is in a subdirectory of a Java Runtime Environment (JRE). This is a read-only property that allows you to query the choice made by the runtime.

The default JVM that would be used in in-process mode if JvmPath is not specified explicitly.

◆ DisableClassGC

bool Codemesh.JuggerNET.JvmLoader.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.JvmLoader.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.JvmLoader.EnableVerboseGC
getset

Enables verbose garbage collection if set to true.

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

◆ Exit

ExitCallback Codemesh.JuggerNET.JvmLoader.Exit
getset

The callback for JVM exit.

◆ ExtensionDirectories

string Codemesh.JuggerNET.JvmLoader.ExtensionDirectories
getset

The extensions directory configured for the JVM.

◆ Future

bool Codemesh.JuggerNET.JvmLoader.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.JvmLoader.IgnoreUnrecognized
getset

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

◆ InitialHeapSize

int Codemesh.JuggerNET.JvmLoader.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.JvmLoader.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.JvmLoader.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.JvmLoader.JavaAgent
set

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

Available since version 3.3.13.

◆ JNILevel

int Codemesh.JuggerNET.JvmLoader.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.JvmLoader.JniVersion
getset

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

◆ JvmIfCreated

IJvm Codemesh.JuggerNET.JvmLoader.JvmIfCreated
get

A property giving access to an already created Jvm without creating one. This property allows you to query whether a Jvm has already been loaded via the JvmLoader API.

◆ JvmLoaderIfCreated

IJvmLoader Codemesh.JuggerNET.JvmLoader.JvmLoaderIfCreated
staticget

A property giving access to an already created JvmLoader without creating one. This property allows you to query whether a JvmLoader has already been created.

Referenced by Codemesh.JuggerNET.JuggerNETProxyObject.JuggerNETProxyObject().

◆ JvmPath

string Codemesh.JuggerNET.JvmLoader.JvmPath
getset

The JVM that is to be used in in-process mode. This is the full path to a file which is usually called jvm.dll and is in a subdirectory of the Java Runtime Environment (JRE).

The JVM that is to be used in in-process mode.

◆ LibraryPath

string Codemesh.JuggerNET.JvmLoader.LibraryPath
getset

The application librarypath configured for the JVM.

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

◆ MaximumHeapSize

int Codemesh.JuggerNET.JvmLoader.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.JvmLoader.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.

◆ MethodsAndFieldsAnalysis

string Codemesh.JuggerNET.JvmLoader.MethodsAndFieldsAnalysis
get

A property that can be used to analyze the inner structure of proxy classes. The returned string contains useful cleartext feedback on the availability of Java fields and methods for present proxy type field and method elements.

◆ MilliSecondsToForcedGC

int Codemesh.JuggerNET.JvmLoader.MilliSecondsToForcedGC
getset

Specifies the number of milliseconds between forced garbage collections to alleviate memory pressure on the Java heap. The default value is 1000. A value of 0 disables forced garbage collection.

The number of milliseconds between forced garbage collections.

◆ MixedMode

bool Codemesh.JuggerNET.JvmLoader.MixedMode
getset

Enables mixed execution mode if set to true.

This property corresponds with the Java -Xmixed option.

◆ ModulePath

string Codemesh.JuggerNET.JvmLoader.ModulePath
getset

The application modulepath configured for the JVM.

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

See also
IJvmOptions.AppendToModulePath, IJvmOptions.PrependToModulePath

<since>netrt v3.6</since>

◆ NoAgent

bool Codemesh.JuggerNET.JvmLoader.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.

◆ NoshutdownProcessing

bool Codemesh.JuggerNET.JvmLoader.NoshutdownProcessing
getset

Governs whether the application should attempt to perform cleanup in the JVM when shutting down. This defaults to false, but some applications may require setting this property to true if they experience shutdown crashes.

Governs whether the application should attempt to perform cleanup in the JVM when shutting down.

◆ NumObjectsToForcedGC

int Codemesh.JuggerNET.JvmLoader.NumObjectsToForcedGC
getset

Specifies the number of prxoy objects that need to be instantiated before a forced garbage collection takes place to alleviate memory pressure on the Java heap. The default value is 10,000. A value of 0 disables forced garbage collection.

The number of proxy object creations between forced garbage collections.

◆ PrependBootClassPath

string Codemesh.JuggerNET.JvmLoader.PrependBootClassPath
getset

The JVMs prepend-to-bootclasspath setting.

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

◆ Prof

bool Codemesh.JuggerNET.JvmLoader.Prof
getset

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

See also
IJvmOptions.Run

◆ ReduceSignals

bool Codemesh.JuggerNET.JvmLoader.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.JvmLoader.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.JvmLoader.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.JvmLoader.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.JvmLoader.Splash
set

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

Available since version 3.3.13.

◆ StackSize

int Codemesh.JuggerNET.JvmLoader.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.JvmLoader.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.

◆ TraceFile

string Codemesh.JuggerNET.JvmLoader.TraceFile
getset

A file into which trace messages are written. If not specified, all tracing output is going to stdout.

A file into which trace messages are written.

Referenced by Codemesh.JuggerNET.JvmLoader.SetTraceFile().

◆ TraceFileCount

int Codemesh.JuggerNET.JvmLoader.TraceFileCount
getset

The number of old trace files to retain.

A number. Zero means that no old files are retained.

Referenced by Codemesh.JuggerNET.JvmLoader.SetTraceFile().

◆ TraceMethod

TraceCallback Codemesh.JuggerNET.JvmLoader.TraceMethod
getset

Allows you to register a custom tracing method.

The custom tracing method delegate.

◆ UseCodemeshSecurityManager

bool Codemesh.JuggerNET.JvmLoader.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.JvmLoader.Verbose
getset

The verbosity of the JVM.

◆ Vfprintf

VfprintfCallback Codemesh.JuggerNET.JvmLoader.Vfprintf
getset

The callback for JVM print statements.


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

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