Re: [Ikvm-developers] ikvmc
Brought to you by:
jfrijters
|
From: Jeroen F. <je...@su...> - 2016-10-21 07:25:58
|
Hi Christian, Java doesn't support value types, so there is no way for IKVM to sensibly support mutable value types. Regards, Jeroen > -----Original Message----- > From: Mohr, Christian [mailto:chr...@sa...] > Sent: Friday, October 21, 2016 8:48 > To: ikv...@li... > Subject: [Ikvm-developers] ikvmc > > 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 > > |