Convert Java class to DLL [duplicate]

泄露秘密 提交于 2019-12-25 17:45:14

问题


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?


回答1:


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




回答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




回答3:


For this you can use IKVM.NET.



来源:https://stackoverflow.com/questions/15134961/convert-java-class-to-dll

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!