| 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.C2JBridgeAssembly: C2JBridge (in C2JBridge.dll) Version: 2.5.21.241219-a6a144ea07c497c3a9a1be842408e852afb458be
Syntax public Object DynJVM { get; }
Public ReadOnly Property DynJVM As Object
Get
Property Value
ObjectA dynamic entry point to interact with JVM
Implements
IJVMBridgeCoreDynJVMRemarks 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:
var myStr = DynJVM.String.@new();
For an array:
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