Re: [Ikvm-developers] Calling Jars from C#
Brought to you by:
jfrijters
|
From: Michael K. <mi...@sa...> - 2012-11-08 22:20:34
|
On 08/11/2012 18:07, Dan Higinbotham wrote: > > I am completely new at using IKVM. > > I would like to call jar files directly from a C# program. Is that > possible? > > Where can I find the documentation for how to do that? > > You will find that the IKVM software is brilliant, the support is brilliant, but the documentation is awful. Basically what you need to do is convert the Jar file to a .NET assembly using IKVMC. You can then call it in the same way as any other .NET assembly - for example, you can browse the interfaces it offers in Visual Studio, which will very closely reflect the classes/methods that were available to a Java user in the original JAR file. If the interfaces in the JAR using basic types such as strings, integers, and so on, that's all you need. If they use Java things like streams or DOM documents, then if you want to give the C# application an API with a "native" feel to it, you will need to write a wrapper library that redesigns the API. Michael Kay Saxonica |