-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
  • 79,279
  • 19
  • 185
  • 195
Raed Alsaleh
  • 1,581
  • 9
  • 27
  • 50

3 Answers3

3

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

Joey
  • 344,408
  • 85
  • 689
  • 683
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
  • 428
  • 3
  • 6
  • 21
1

For this you can use IKVM.NET.

Mihai8
  • 3,113
  • 1
  • 21
  • 31