Click or drag to resize

SetupJVMWrapper Class

Main entry point for JVM languages setup and execution.
Inheritance Hierarchy
SystemObject
  MASES.JCOBridge.C2JBridgeSetupJVMWrapper
    MASES.JCOBridge.C2JBridgeSetupJVMWrapperT

Namespace: MASES.JCOBridge.C2JBridge
Assembly: C2JBridge (in C2JBridge.dll) Version: 2.6.2.250821-1d39389489804d6a3c7a28203f93adc3f9dc1870
Syntax
public class SetupJVMWrapper : IJVMWrapperManagement

The SetupJVMWrapper type exposes the following members.

Constructors
 NameDescription
Public methodSetupJVMWrapper Initialize a new instance of SetupJVMWrapper
Public methodSetupJVMWrapper(String) Initialize a new instance of SetupJVMWrapper
Obsolete
Top
Properties
 NameDescription
Public propertyClassPath The starting JVM class path. Further path can be added later.
Public propertyStatic memberContainerId Return a String identifier of the container instance
Public propertyDebugSuspendFlag Enables Debug
Public propertyCode exampleDynJVM The dynamic entry point for JVM operations. It permits to write code in .NET languages using a syntax not far from the one available in Java.
Public propertyEnableCriticalMethods Always enable/disable use of critical methods within JNI interface, to get/set native type arrays, single wrapper for EnableCriticalMethodsOnGet and EnableCriticalMethodsOnSet
Obsolete
Public propertyEnableCriticalMethodsOnGet Always enable/disable use of critical methods, within JNI interface, to get native type arrays
Obsolete
Public propertyEnableCriticalMethodsOnGetThreshold Enable/Disable use of critical methods, within JNI interface, to get native type arrays if the length is over the EnableCriticalMethodsOnSetThreshold. Default is MaxValue
Obsolete
Public propertyEnableCriticalMethodsOnSet Always enable/disable use of critical methods, within JNI interface, to set native type arrays
Obsolete
Public propertyEnableCriticalMethodsOnSetThreshold Enable/Disable use of critical methods, within JNI interface, to set native type arrays if the length is over the EnableCriticalMethodsOnSetThreshold. Default is MaxValue
Obsolete
Public propertyEnableDebug Enables Debug
Public propertyFeatureLevel Reports the feature level of the JVM in use
Obsolete
Public propertyStatic memberFilteredArgs The remaining arguments after applied the parsing of JCOBridge arguments. Useful when invoked application does not accept arguments related to JCOBridge.
Public propertyGlobalHeapSize Sets the global heap size
Public propertyGlobalize Set to to avoid globalization of the instance. Default is
Public propertyInitialHeapSize Sets the initial heap size
Public propertyStatic memberIsContainer Return if the running environment is a container
Public propertyJavaDebugOpts Java Debug options used if EnableDebug is true
Public propertyJavaDebugPort Java Debug Port
Public propertyJDKHome The path where is located the JRE of the installed JDK
Public propertyJmxPort The JMX Port to use
Public propertyJNIOutputFile The path where the JNI verbose info will be written. The file will be opened in append mode.
Public propertyJNIVerbosity Sets the verbosity of the JNI interface. See oracle documentation.
Public propertyJVM The entry point for direct JVM operations. Use DynJVM to write code like you made in Java
Public propertyJVMOptions The options to pass to the JVM when a JVM will be created
Public propertyJVMPackages The list of packages on startup. Further packages can be added later
Public propertyJVMPath The path to the JRE ennvironment or full path to (jvm.dll/libjvm.so). If not set the library try to find a suitable version on the system.
Protected propertyJVMStats The entry point for JVM statistics
Public propertyLicensePath The path where is located the license file
Public propertyManagement The entry point for management operations
Public propertyModulePath The starting JVM module path. Further path can be added later.
Protected propertyRemoteBridge Direct accessor to the JCOBridge class in the JVM context
Protected propertyRemoteJCOBridge Dynamic accessor to the JCOBridge class in the JVM context
Public propertyScopedOn Used to define the usage scope when JCOBridge is embedded in another application. It overrides the environment variable JCOBRIDGE_SCOPEDON
Public propertyScopedOnVersion Used to define the Version usage scope when JCOBridge is embedded in another application. It overrides the environment variable JCOBRIDGE_SCOPEDONVERSION
Public propertySuppressFinalize to suppress finalization of the class instance inherited from SetupJVMWrapper when the instance is created using CreateGlobalInstance, the instance is globalized using Globalize(IJVMBridgeCore, Boolean). Default value is .
Top
Methods
 NameDescription
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalize Finalize an instance of SetupJVMWrapper
(Overrides ObjectFinalize)
Public methodGetCLRGlobal Get previously registered Object from CLR global mapper
Obsolete
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetJCGraphicContainer(IJavaObject, Boolean) Requests to allocate a remote graphic container to host the Component in graphicObject
Obsolete
Public methodGetJCGraphicContainer(String, Boolean) Requests to allocate a remote graphic container to host the Component with class name className
Obsolete
Public methodGetJVMGlobal Get previously registered IJavaObject from JVM global mapper
Obsolete
Public methodGetListener Returns the IJVMBridgeBase listener reference associated to the JVM reference
Obsolete
Public methodStatic memberGetMainClasses Retrieve all Main-Class from the assembly
Obsolete
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodCode exampleImportPackage Imports a Java package to be used within the program
Obsolete
Public methodInitializeListener Request the initialization of the Listener from the JVM. The listener is a new class which inherits from JVMBridgeListener or JVMBridgeListener
Obsolete
Public methodStatic memberLaunch(Type, String) Launch the type with the args arguments
Obsolete
Public methodStatic memberLaunchTClass(String) Launch the TClass with the args arguments
Obsolete
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Protected methodPostInitialization Override the method to manage post initialization step
Protected methodPreInitialization Override the method to setup some information, this is the first method invoked: some settings can be applied here like SetEventOrExceptionHandler(EventHandlerEventOrExceptionEventArgs)
Protected methodProcessCommandLine Process command line arguments
Public methodRegisterCLRGlobal Register the object into the global CLR mapper.
Obsolete
Public methodReleaseJCGraphicContainer Reelase a IJCGraphicContainer from the JVM
Obsolete
Public methodReleaseListener Release a IJVMBridgeBase listener reference from the JVM
Obsolete
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodUnregisterCLRGlobal Unregister the object from the global CLR mapper.
Obsolete
Public methodUnwrapAndDemonizeOnT Creates and unwrap the JVM instance as daemon
Public methodUnwrapOnT Creates and unwrap the JVM instance
Top
Extension Methods
 NameDescription
Public Extension MethodConvertTReturn Converts a generic object
(Defined by JCOBridgeExtensions)
Public Extension MethodToNative Converts a generic input to an object manageable from the JVM
(Defined by JCOBridgeExtensions)
Top
Example
This is a basic example showing SetupJVMWrapper class usage
C#
class JVMWrapperApp : SetupJVMWrapper
{
    public void Execute()
    {
         ImportPackage("java.lang");
         ImportPackage("java.util");

         var str = DynJVM.String.@new();
         str = str.concat("HELLO WORLD FROM JVM!!!"); // this command is executed within the JVM context
         Console.WriteLine("Output from JVM: {0}", str);
     }
}
To run use: applicationName --JVMPath:[ABSOLUTE PATH TO JRE LIBRARY (jvm.dll/libjvm.so)] Other command line switch are available on https://www.jcobridge.com/command-line-options/
See Also