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?
Asked
Active
Viewed 7,489 times
-1
-
2http://stackoverflow.com/q/262603/93732 – Ahmet Kakıcı Feb 28 '13 at 12:00
-
2You could also look at the Java Native Interface (JNI) to allow your .NET code to call your Java code and vice-versa. – RB. Feb 28 '13 at 12:04
3 Answers
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