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.17.240622-f0da58d62b7e98f73f32432917df8eb1a5f062a3
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