Re: [Ikvm-developers] Using ikvm.lang.CIL
Brought to you by:
jfrijters
|
From: Jeroen F. <je...@su...> - 2013-04-12 06:46:17
|
Hi Michael,
In the ikvmbin.zip distributions there is a lib/ikvm-api.jar file that contains the stubs for the ikvm utility classes. If you build from source, it is created in the lib directory.
(This jar is produced by running ikvmstub on IKVM.OpenJDK.Core.dll. The not supported warning is me being cautious, it does actually work.)
Regards,
Jeroen
> -----Original Message-----
> From: Michael Bayne [mailto:md...@sa...]
> Sent: Thursday, April 11, 2013 21:02
> To: ikv...@li...
> Subject: [Ikvm-developers] Using ikvm.lang.CIL
>
> 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... <mailto:md...@sa...>
|