JuggerNET Runtime Library v3.6.54.0
3.6.54.0
|
The class that acts as a factory for JVM instances. More...
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... | |
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:
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.
|
inline |
Append a classpath root to the configured bootclasspath. A classpath root is a directory or a jarfile or a zipfile.
cproot | A 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.
|
inline |
Append a classpath root to the classpath. A classpath root is a directory or a jarfile or a zipfile.
cproot | A 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.
|
inline |
Appends a directory to the configured extensions directories.
extdir | A directory to append to the list of extensions directories. |
Implements Codemesh.JuggerNET.IJvmOptions.
|
inline |
Append a directory to the library search path.
libpathroot | A directory in which the JVM will look for native libraries. |
Implements Codemesh.JuggerNET.IJvmOptions.
|
inline |
Append a modulepath root to the modulepath. A modulepath root is usually a directory or a jarfile or a zipfile.
cproot | A 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>
|
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.
Referenced by Codemesh.JuggerNET.Jvm.Destroy(), Codemesh.JuggerNET.JvmLoaderFactory.GetDefaultJvmLoader(), Codemesh.JuggerNET.JvmLoader.GetJvmLoader(), Codemesh.JuggerNET.JvmLoaderFactory.GetJvmLoader(), Codemesh.JuggerNET.JvmLoaderFactory.GetJvmLoaderFullySpecified(), Codemesh.JuggerNET.JvmLoaderFactory.GetJvmLoaderWithBooleans(), Codemesh.JuggerNET.JvmLoaderFactory.GetJvmLoaderWithFile(), Codemesh.JuggerNET.JvmLoaderFactory.GetJvmLoaderWithTracing(), Codemesh.JuggerNET.JuggerNETProxyObject.JuggerNETProxyObject(), and Codemesh.JuggerNET.LifeCycleManager.keep().
|
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.
bEnvOverrides | allow environment variable overrides. |
bDefaultJvm | use a default JVM if none is specified. |
References Codemesh.JuggerNET.JvmLoader.GetJvmLoader().
|
inlinestatic |
Returns an already created JVM Loader instance or a newly created JVM loader that uses the given settings.
bEnvOverrides | allow environment variable overrides. |
bDefaultJvm | use a default JVM if none is specified. |
fac | the tracing facility(ies) for which we specify the tracing level. |
level | the tracing level. |
References Codemesh.JuggerNET.IOptions.MilliSecondsToForcedGC, Codemesh.JuggerNET.IOptions.NumObjectsToForcedGC, and Codemesh.JuggerNET.IOptions.SetTraceLevel().
|
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.
configFile | the configuration file to be used. |
bEnvOverrides | allow environment variable overrides. |
bDefaultJvm | use a default JVM if none is specified. |
References Codemesh.JuggerNET.JvmLoader.GetJvmLoader().
|
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.
configFile | the configuration file to be used. |
bEnvOverrides | allow environment variable overrides. |
bDefaultJvm | use a default JVM if none is specified. |
fac | the tracing facility(ies) for which we specify the tracing level. |
level | the tracing level. |
References Codemesh.JuggerNET.IOptions.MilliSecondsToForcedGC, Codemesh.JuggerNET.IOptions.NumObjectsToForcedGC, Codemesh.JuggerNET.IJvmLoader.Read(), and Codemesh.JuggerNET.IOptions.SetTraceLevel().
|
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.
configFile | the configuration file to be used. |
vers | the verswion number of the configuration section. |
conf | the configuration name. |
reserved | should be NULL. |
bEnvOverrides | allow environment variable overrides. |
bDefaultJvm | use a default JVM if none is specified. |
References Codemesh.JuggerNET.JvmLoader.GetJvmLoader().
|
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.
configFile | the configuration file to be used. |
vers | the verswion number of the configuration section. |
conf | the configuration name. |
reserved | should be NULL. |
bEnvOverrides | allow environment variable overrides. |
bDefaultJvm | use a default JVM if none is specified. |
fac | the tracing facility(ies) for which we specify the tracing level. |
level | the tracing level. |
References Codemesh.JuggerNET.IOptions.MilliSecondsToForcedGC, Codemesh.JuggerNET.IOptions.NumObjectsToForcedGC, Codemesh.JuggerNET.IJvmLoader.Read(), and Codemesh.JuggerNET.IOptions.SetTraceLevel().
|
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.
vers | the verswion number of the configuration section. |
conf | the configuration name. |
reserved | should be NULL. |
bEnvOverrides | allow environment variable overrides. |
bDefaultJvm | use a default JVM if none is specified. |
fac | the tracing facility(ies) for which we specify the tracing level. |
level | the tracing level. |
References Codemesh.JuggerNET.IOptions.MilliSecondsToForcedGC, Codemesh.JuggerNET.IOptions.NumObjectsToForcedGC, and Codemesh.JuggerNET.IOptions.SetTraceLevel().
|
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.
fac | the facility for which we're setting the level |
level | the tracing level |
References Codemesh.JuggerNET.JvmLoader.GetJvmLoader().
|
inline |
Query the trace level for a trace facility.
fac | The trace facility for which we want to know the current trace level. |
Implements Codemesh.JuggerNET.IOptions.
|
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
.
Implements Codemesh.JuggerNET.IJvmLoader.
|
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
.
bAcceptPreloaded | true if an already loaded JVM is OK to use. |
Implements Codemesh.JuggerNET.IJvmLoader.
|
inline |
Prepend a classpath root to the configured bootclasspath. A classpath root is a directory or a jarfile or a zipfile.
cproot | A 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.
|
inline |
Prepend a classpath root to the classpath. A classpath root is a directory or a jarfile or a zipfile.
cproot | A 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.
|
inline |
Prepend a directory to the librarypath.
libpathroot | A directory in which the JVM will look for native libraries. |
Implements Codemesh.JuggerNET.IJvmOptions.
|
inline |
Prepend a modulepath root to the modulepath. A modulepath root is usually a directory or a jarfile or a zipfile.
cproot | A 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>
|
inline |
Explicitly updates the instance with configuration information from the specified configuration file.
file | the configuration file to be used. |
Implements Codemesh.JuggerNET.IJvmLoader.
|
inline |
Explicitly updates the instance with configuration information from the specified source.
file | the configuration file to be used. May be null to represent the registry. |
vers | the version of the named configuration to be used. May be null. |
conf | the name of the named configuration to be used. May be null. |
reserved0 | Must be null. |
Implements Codemesh.JuggerNET.IJvmLoader.
|
inline |
Explicitly updates the instance with configuration information from the registry.
vers | the version of the named configuration to be used. May be null. |
conf | the name of the named configuration to be used. May be null. |
reserved0 | Must be null. |
Implements Codemesh.JuggerNET.IJvmLoader.
|
inlinestatic |
Registers a configuration hook with the runtime library.
hook | the configuration hook that will be invoked at certain times. |
|
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.
configFile | the file containing runtime configuration information. |
Referenced by Codemesh.JuggerNET.JvmLoaderFactory.SetConfigFile().
|
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.
configFile | |
vers | |
conf | |
reserved |
|
inline |
Sets both the trace file name and the number of old files to retain in one operation.
name | The trace file name. |
numFilesToRetain | The number of old trace files to retain. |
Implements Codemesh.JuggerNET.IOptions.
References Codemesh.JuggerNET.JvmLoader.TraceFile, and Codemesh.JuggerNET.JvmLoader.TraceFileCount.
|
inline |
Set the trace level for a trace facility.
fac | The trace facility(s) for which we're applying a trace level. |
level | The trace level we're applying. |
Implements Codemesh.JuggerNET.IOptions.
|
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).
jvm | The JVM that is being destroyed. |
Implements Codemesh.JuggerNET.IJvmLoader.
|
getset |
The callback for JVM abortion.
|
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:
|
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";
|
getset |
The JVMs append-to-bootclasspath setting.
This property corresponds with the Java -Xbootclasspath/a:
option.
|
getset |
The JVMs bootclasspath.
This property corresponds with the Java -Xbootclasspath:
option.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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:
The second line will override the first line's value becaues internally the two lines result in the same property being set.
|
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:
The second line will override the first line's value becaues internally the two lines result in the same property being set.
|
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:
where the value for the Run
option depends on your JVM and your debugger.
|
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.
|
getset |
Disables class garbage collection if set to true
.
This property corresponds with the Java -Xnoclassgc
option.
|
getset |
Enables class garbage collection if set to true
.
This property corresponds with removing the Java -Xnoclassgc
option.
|
getset |
Enables verbose garbage collection if set to true
.
This property corresponds with the Java -verbose:gc
option.
|
getset |
The callback for JVM exit.
|
getset |
The extensions directory configured for the JVM.
|
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.
|
getset |
Governs whether an unrecognized configuration option causes an JVM initialization error.
|
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.
|
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.
|
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.
|
set |
A property that corresponds with the Java5/6 -agentpath option.
Available since version 3.3.13.
|
getset |
The JNI Version number to be used for initialization of the JVM. This is synonymous to the JniVersion property.
|
getset |
The JNI Version number to be used for initialization of the JVM. This is synonymous to the JNILevel property.
|
get |
|
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().
|
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.
|
getset |
The application librarypath configured for the JVM.
This property corresponds with the Java -Djava.library.path=
option.
|
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.
|
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.
|
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.
|
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.
|
getset |
Enables mixed execution mode if set to true
.
This property corresponds with the Java -Xmixed
option.
|
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.
<since>netrt v3.6</since>
|
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.
|
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.
|
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.
|
getset |
The JVMs prepend-to-bootclasspath setting.
This property corresponds with the Java -Xbootclasspath/p:
option.
|
getset |
Start the JVM with profiling support enabled if this property is true
.
|
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.
|
getset |
Specifies particular runtime settings that are used to configure the debugging or profiling support.
|
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.
|
getset |
The name of a file which contains the security policy for the session.
This property corresponds with the Java -Djava.security.policy=
option.
|
set |
A property that corresponds with the Java5/6 -splash option.
Available since version 3.3.13.
|
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.
|
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.
|
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().
|
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().
|
getset |
Allows you to register a custom tracing method.
The custom tracing method delegate.
|
getset |
|
getset |
The verbosity of the JVM.
|
getset |
The callback for JVM print statements.