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.5.21.241219-a6a144ea07c497c3a9a1be842408e852afb458be
Syntax
public class SetupJVMWrapper : IJVMWrapperManagement, 
	IJVMBridgeCore

The SetupJVMWrapper type exposes the following members.

Constructors
 NameDescription
Public methodSetupJVMWrapper Initialize a new instance of SetupJVMWrapper
Public methodSetupJVMWrapper(String)Obsolete.
Initialize a new instance of SetupJVMWrapper
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
Public propertyEnableCriticalMethodsOnGet Always enable/disable use of critical methods, within JNI interface, to get native type arrays
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
Public propertyEnableCriticalMethodsOnSet Always enable/disable use of critical methods, within JNI interface, to set native type arrays
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
Public propertyEnableDebug Enables Debug
Public propertyFeatureLevel Reports the feature level of the JVM in use
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 do not globilize 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 propertyLastBindingException Last Exception raised from C# to Java interface. Useful to identify the real exception behind a RuntimeBinderException raised when DynJVM accessor is in use.
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 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) or GlobalizeTClass. 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
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
Public methodGetJCGraphicContainer(String, Boolean) Requests to allocate a remote graphic container to host the Component with class name className
Public methodGetJVMGlobal Get previously registered IJavaObject from JVM global mapper
Public methodGetListener Returns the IJVMBridgeBase listener reference associated to the JVM reference
Public methodStatic memberGetMainClasses Retrieve all Main-Class from the assembly
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodCode exampleImportPackage Imports a Java package to be used within the program
Public methodInitializeListener Request the initialization of the Listener from the JVM. The listener is a new class which inherits from JVMBridgeListener or JVMBridgeListener
Public methodStatic memberLaunch(Type, String) Launch the type with the args arguments
Public methodStatic memberLaunchTClass(String) Launch the TClass with the args arguments
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Protected methodProcessCommandLine Process command line arguments
Public methodRegisterCLRGlobal Register the object into the global CLR mapper.
Public methodReleaseJCGraphicContainer Reelase a IJCGraphicContainer from the JVM
Public methodReleaseListener Release a IJVMBridgeBase listener reference from the JVM
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodUnregisterCLRGlobal Unregister the object from the global CLR mapper.
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 MethodGlobalize Creates a new global instance pointer
(Defined by JCOBridge)
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