2

I have the need to convert a jar to a dll which I achieved with ikvm. However anytime i add the dll to a c# project in visual studio it complains that i need to add a reference to ikvm.openjdk.core.dll.

The type 'java.lang.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'IKVM.OpenJDK.Core, Version=7.0.4335.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58'.

Is there a way i can convert the jar to a dll without this dependency? maybe some command that would "build" everything together into one dll? Thanks

Cool Dude
  • 219
  • 3
  • 14

2 Answers2

1

No, it is not possible to compile the jar to a .NET assembly without this dependency, since the IKVM compiler will remap the usage of the native Java classes to the .NET implementation of the Java classes contained in this assembly (or other IKVM assemblies depending on the classes in your code).

If the number of assemblies is the problem you can merge them. See How do I merge multiple .net assemblies into a single assembly?

Community
  • 1
  • 1
Haze
  • 116
  • 7
  • 1
    This part I understand... but from IKVMC, is there a way to make the refence "implicit"? For instance (I know very little about .NET) I know my library requires more of the IKVM Dll's to run, yet I only have to reference my library + the IKVM.OpenJDK.Core library, and .NET figures out the rest. Would it be possible to get the same behavior in the generated dll? – Justin Smith Mar 01 '13 at 23:57
0

Does ikvm.open.jdk need java to run what i mean is when i run the dot net application does it communicate with jdk in order to populate result