[Ikvm-developers] ikvmc
Brought to you by:
jfrijters
|
From: Mohr, C. <chr...@sa...> - 2016-10-21 06:48:26
|
I'm searching for help when using ikvmc of version 8.1.57.17.0. My Java application references some jar files that I have created from .NET DLLs using ikvmstub. After using them I wanted to convert the resulting jar back with ikvmc. It worked out and I got a resulting DLL. Unfortunately the code inside this DLL does not work on my .NET 4.5.2 environment. The reason is that ikvmc introduces a lot of unboxing conversions to the coding that my c# environment is not able to resolve. Example: The line empMetaData.Id = exampleNodeId; in my Java application turns into ((EmpMetaData) (object) (EmpMetaData) this.empMetaData).Id = (__Null) EMPJavaExampleImplementation.exampleNodeId; In the resulting DLL. But to make it run it should look like this: empMetaData.Id = exampleNodeId; EMPMetaData is a struct in c#. exampleNodeId is a static variable of my java class. Can anybody give me a hint how my Java code has to look like to prevent ikvmc from unboxing ? Best regards Christian |