-1

I need to use Java code in .NET (C#) and am looking for a way to convert a Java class to a DLL file (which I can then reference in my .NET app). Is this a valid scenario? If yes, How can I do it?

Perception
  • 77,470
  • 19
  • 176
  • 187
Raed Alsaleh
  • 1,491
  • 8
  • 26
  • 48

3 Answers3

3

You can use IKVM.NET to use Java classes and libraries from .NET.

Joey
  • 330,812
  • 81
  • 665
  • 668
2

Basically that is not a good idea. Since java emphasizes on platform independence, but dll is platform dependent. So, think about pack into a jar file, execute and consume it somehow

May be this link will be useful for you:

http://www.codeproject.com/Articles/13549/Using-Java-Classes-in-your-NET-Application

Prabhath kesav
  • 418
  • 3
  • 6
  • 21
1

For this you can use IKVM.NET.

Mihai8
  • 3,023
  • 1
  • 19
  • 29