问题.NET调用Java [英] Problems .net calling java
问题描述
你好Chayan.
我们正在使用ikvm来编译Java类,以便从.net使用.
我们发现了两个问题:
-如果Java类使用其他Java * .jar,则从.net代码执行时它们将不起作用. (我们尝试以相同的方式将它们转换为dll,将它们放入我们包含的目录中,但似乎无济于事.)
-另一个是我们已经在Java类内部创建了类,用于使用线程进行管理,并且从.net调用时,它无法识别这些类.
有什么主意吗?
非常感谢您的关注.
Hello Chayan.
We''re using ikvm to compile java classes to use from .net.
There are 2 problems we''re finding:
- If the java class uses other java *.jar, they don''t work when executed from the .net code. (We tried converting them to dll the same way, putting them in directories we include but nothing seems to work).
- The other one is that we''ve created to classes inside a java class, for managing with threads, and when called from .net, it doesn''t recognize the classes.
Any idea?
Thanks a lot for your attention.
推荐答案
请-使用Eclipse开发和部署Java应用程序(它是免费的且简单).您应该将其设置为可运行的jar -与简单的存档jar 有所不同.
匿名类还可以,也不建议这样做.您应该提取它们并使其正确开发.
考虑将一些日志记录添加到jar中,log4j是一个简单的日志记录工具,可以节省您的时间&工作与神经.
如何执行jar [如果您仍然拒绝使用Eclipse(强烈建议使用!!!) [ ^ ]
Please - use Eclipse to develop and deploy your Java App(It''s Freeware and simple). You should make it a runnable jar - that is a difference from a simple archive jar.
anonymous classes are ok, also it''s not a recommended workaround. You should extract them and make it a proper development.
Think about adding some logging to the jar, log4j is a simple logging tool and can save you time & work & nerves.
How to execute the jar[^]
If you still resist to use Eclipse (strongly recommended to be used!!!)[^]
这篇关于问题.NET调用Java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!