[Ikvm-developers] Using ikvm.lang.CIL
Brought to you by:
jfrijters
|
From: Michael B. <md...@sa...> - 2013-04-11 19:08:54
|
I need to convert a (Java) double to a cli.System.Double (from within Java
code) and it appears that the way to do that is to use ikvm.lang.CIL.
Basically I want to do the moral equivalent of:
double d = 15.5;
cli.System.Double sd = ikvm.lang.CIL.box_double(d);
System.out.println(sd.ToString(
"C2", cli.System.Globalization.CultureInfo.GetCultureInfo("en-US")));
Is there a recommended way to compile Java code against ikvm.lang.CIL? I
can't generate a stub from IKVM.OpenJDK.Core.dll because ikvmstub.exe says
that generating stubs from IKVM DLLs is not supported. I'm not even 100%
sure that ikvm.lang.CIL is in IKVM.OpenJDK.Core.dll because monodis core
dumps when trying to enumerate its methods, but I'm pretty sure it's in
there. It's not in IKVM.Runtime.dll and that seems like the next best place.
Should I just create my own stub jar with ikvm.lang.CIL and compile against
that? That's easy enough, but I wanted to be sure there wasn't a
better/easier way.
Thanks!
-- md...@sa...
|