Click or drag to resize

SetupJVMWrapperDynJVM Property

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.

Namespace: MASES.JCOBridge.C2JBridge
Assembly: C2JBridge (in C2JBridge.dll) Version: 2.6.2.250821-1d39389489804d6a3c7a28203f93adc3f9dc1870
Syntax
public Object DynJVM { get; }

Property Value

Object
A dynamic entry point to interact with JVM
Remarks
It is marked with dynamic keyword. If during runtime an RuntimeBinderException is thrown, check the code to verify if there is a correspondance on Java side. Possible problems come from:
- A not imported package
- A not existent class
- A type in code
- A missing method on the requested Java class
Example
To instantiate a new JVM String you can use a code like:
C#
var myStr = DynJVM.String.@new();
For an array:
C#
var myArray = DynJVM.ArrayList.@new();
myArray.add(1);
myArray.add(2);
In general this property make the operations against the JVM very simple.
See Also