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.5.13.240514-86ea0fe57add44a0d4dc719a1a99f3379a320f2e
Syntax
public Object DynJVM { get; }

Property Value

Object
A dynamic entry point to interact with JVM

Implements

IJVMBridgeCoreDynJVM
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