Click or drag to resize

SetupJVMWrapperT Class

Main entry point for JVM languages setup and execution.
Extend this class to use external threading
Inheritance Hierarchy
SystemObject
  MASES.JCOBridge.C2JBridgeSetupJVMWrapper
    MASES.JCOBridge.C2JBridgeSetupJVMWrapperT

Namespace:  MASES.JCOBridge.C2JBridge
Assembly:  C2JBridge (in C2JBridge.dll) Version: 2.4.12.220507-908f547aedf9e08963d047b783e99d6b2ed61a1c
Syntax
public class SetupJVMWrapper<T> : SetupJVMWrapper
where T : SetupJVMWrapper

Type Parameters

T
The class extending SetupJVMWrapper

The SetupJVMWrapperT type exposes the following members.

Constructors
  NameDescription
Public methodSetupJVMWrapperT
Initializes a new instance of the SetupJVMWrapperT class
Top
Properties
  NameDescription
Public propertyClassPath
The starting JVM class path. Further path can be added later.
(Inherited from SetupJVMWrapper.)
Public propertyDebugSuspendFlag
Enables Debug
(Inherited from SetupJVMWrapper.)
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.
(Inherited from SetupJVMWrapper.)
Public propertyEnableDebug
Enables Debug
(Inherited from SetupJVMWrapper.)
Public propertyGlobalHeapSize
Sets the global heap size
(Inherited from SetupJVMWrapper.)
Public propertyStatic memberGlobalInstance
Create and return a singleton global instance of T
Public propertyInitialHeapSize
Sets the initial heap size
(Inherited from SetupJVMWrapper.)
Public propertyJavaDebugOpts
Java Debug options used if EnableDebug is true
(Inherited from SetupJVMWrapper.)
Public propertyJavaDebugPort
Java Debug Port
(Inherited from SetupJVMWrapper.)
Public propertyJDKHome
The path where is located the JRE of the installed JDK
(Inherited from SetupJVMWrapper.)
Public propertyJmxPort
The JMX Port to use
(Inherited from SetupJVMWrapper.)
Public propertyJNIOutputFile
The path where the JNI verbose info will be written. The file will be opened in append mode.
(Inherited from SetupJVMWrapper.)
Public propertyJNIVerbosity
Sets the verbosity of the JNI interface. See oracle documentation.
(Inherited from SetupJVMWrapper.)
Public propertyJVM
The entry point for direct JVM operations. Use DynJVM to write code like you made in Java
(Inherited from SetupJVMWrapper.)
Public propertyJVMOptions
The options to pass to the JVM when a JVM will be created
(Inherited from SetupJVMWrapper.)
Public propertyJVMPackages
The list of packages on startup. Further packages can be added later
(Inherited from SetupJVMWrapper.)
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.
(Inherited from SetupJVMWrapper.)
Protected propertyJVMStats
The entry point for JVM statistics
(Inherited from SetupJVMWrapper.)
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.
(Inherited from SetupJVMWrapper.)
Public propertyLicensePath
The path where is located the license file
(Inherited from SetupJVMWrapper.)
Public propertyManagement
The entry point for management operations
(Inherited from SetupJVMWrapper.)
Protected propertyRemoteBridge
Direct accessor to the JCOBridge class in the JVM context
(Inherited from SetupJVMWrapper.)
Protected propertyRemoteJCOBridge
Dynamic accessor to the JCOBridge class in the JVM context
(Inherited from SetupJVMWrapper.)
Top
Methods
  NameDescription
Public methodStatic memberCreateGlobalInstance
Create a singleton global instance of T
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Finalize an instance of SetupJVMWrapper
(Inherited from SetupJVMWrapper.)
Public methodGetCLRGlobal
Get previously registered Object from CLR global mapper
(Inherited from SetupJVMWrapper.)
Public methodGetHashCode
Serves 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
(Inherited from SetupJVMWrapper.)
Public methodGetJCGraphicContainer(String, Boolean)
Requests to allocate a remote graphic container to host the Component with class name className
(Inherited from SetupJVMWrapper.)
Public methodGetJVMGlobal
Get previously registered IJavaObject from JVM global mapper
(Inherited from SetupJVMWrapper.)
Public methodGetListener
Returns the IJVMBridgeBase listener reference associated to the JVM reference
(Inherited from SetupJVMWrapper.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodCode exampleImportPackage
Imports a Java package to be used within the program
(Inherited from SetupJVMWrapper.)
Protected methodInitialize (Inherited from SetupJVMWrapper.)
Public methodInitializeListener
Request the initialization of the Listener from the JVM. The listener is a new class which inherits from CLRListener or JVMBridgeListener
(Inherited from SetupJVMWrapper.)
Protected methodInitializeRemote
Call Initialize(String) on remote environment
(Inherited from SetupJVMWrapper.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodProcessCommandLine
Process command line arguments
(Inherited from SetupJVMWrapper.)
Public methodRegisterCLRGlobal
Register the object into the global CLR mapper.
(Inherited from SetupJVMWrapper.)
Public methodReleaseJCGraphicContainer
Reelase a IJCGraphicContainer from the JVM
(Inherited from SetupJVMWrapper.)
Public methodReleaseListener
Release a IJVMBridgeBase listener reference from the JVM
(Inherited from SetupJVMWrapper.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUnregisterCLRGlobal
Unregister the object from the global CLR mapper.
(Inherited from SetupJVMWrapper.)
Public methodUnwrapAndDemonizeOn
Creates and unwrap the JVM instance as daemon
Public methodUnwrapOn
Creates and unwrap the JVM instance
Top
Extension Methods
Examples
This is a basic example showing SetupJVMWrapper class usage
C#
class JVMWrapperApp : SetupJVMWrapper<JVMWrapperApp<
{
    public void UnwrappedExecute(object args)
    {
        // put here the code to execute in a different JVM thread
    }

    public void Execute()
    {
         // use the following to execute the thread in JVM as deamon
         // the function returns a reference to the instance of the class allocated in the new thread
         // var jvmwrapperRefFromNewThread = UnwrapAndDemonizeOn(UnwrappedExecute);

         // use the following to execute the thread in JVM
         // the function returns a reference to the instance of the class allocated in the new thread
         // var jvmwrapperRefFromNewThread = UnwrapOn(UnwrappedExecute);

         // ... continue here with normal code; it will execute in parallel with unwrapped code
    }
}
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