0

I have created a C# project and a DLL. I have used this command to generate the Java jar file from C# dll.ikvmstub c:\myc#.dll. Here is my C# class that I need to call from java using IKVM

using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

using System.Drawing;
namespace test
{
    public class test
    {

       public test()
       {

       }
        public String printHellowfromC#()
       {
           return "hellow from C#";
       }

    }
} 
Tunaki
  • 132,869
  • 46
  • 340
  • 423
NemugaM
  • 11
  • 5

1 Answers1

0

IKVM is working for C# for using java. It is described on their page "IKVM.NET is an implementation of Java for Mono and the Microsoft .NET Framework." You don't need IKVM for calling C# class from java. You can build native dll from C# and call it from java directly.

mkysoft
  • 5,392
  • 1
  • 21
  • 30
  • Look at here for native dll: http://stackoverflow.com/questions/7092553/turn-a-simple-c-sharp-dll-into-a-com-interop-component – mkysoft Nov 28 '15 at 10:51
  • Look at here for calling dll in java: http://blog.mwrobel.eu/how-to-call-dll-methods-from-java/ – mkysoft Nov 28 '15 at 10:53