Search code examples
c#javaikvm

Can C# do something like SPI in Java (Meta-inf/service)?


I am currently working on converting .JPEG file to .WSQ file, I have successfully done it in Java using a library from http://sourceforge.net/projects/jmrtd/.

Now I wanted to do the same thing in C#, I converted the .jar files into .dll files using IKVM and I can call the libraries of Java in my C# application. But there is a problem, in Java, I found out that the function to convert JPEG to WSQ is available in the external library which is added as an external SPI from the META-INF/service folder. Something like http://docs.oracle.com/javase/tutorial/sound/SPI-intro.html.

The external library is called "indirectly" in Java from what I understand, how can I do this in C#? Is this even possible?


Solution

  • If the "external library" a second jar file then compile both jar files in one step with the parenthesis syntax. Then it should work.

    For details see the IKVM wiki: