参考Java的DLL在C#大会? [英] Reference Java DLL in C# Assembly?

查看:148
本文介绍了参考Java的DLL在C#大会?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有说明这里使用SimMetrics创建一个C#程序集图书馆。他们对这个库提供的链接是 SourceForge上。它看起来像最新版本的SimMetrics库在Java中被创造。难道是可能编译Java代码,然后在C#中引用它在SQL Server 2008?

There are instructions here to create a C# assembly using the SimMetrics library. The link they provided to this library is at SourceForge. It looks like the most recent version of the SimMetrics library was created in Java. Is it possibly to compile java code and then reference it in C# to be used as an assembly in SQL Server 2008?

推荐答案

被用来作为一个组件的你可以做的最好的就是

The best you can do is


  1. 编译Java作为J#用最少的代码改变(现在已经过时了,基本上不支持)。

    • 这是非常依赖于如何库多被使用。


  • 有时这可能是在高度的数学代码非常容易。作为一个利用Java代码很可能假定16位Unicode以及


  • 与SQL服务器承载,这可能是完全不可能运行时,我当然会想跨越每次调用托管障碍'咚'的表现也不佳(因为你会。

SF网页。强烈 < A HREF =http://sourceforge.net/forum/forum.php?forum%5Fid=615509相对=nofollow>意味着有上使用Java和.NET程序发布。

以下是最新的。净释放并的文档

The SF page strongly implies that there is both a java and a .net release.
Here's the latest .net release and documentation

然而基础上,阅读我在

这是原来的.NET实现的和更新的版本,而不是最新的Java代码转换。

This is an updated version of the original .NET implementation and not a conversion of the newest Java Code.

在.NET实现在很大程度上是C#,所以你可以最近差异比较在Java实现的更改,然后试图重现他们在Net代码。由于转换到C#,似乎在很大程度上直接副本给惯用的C#(骆驼外壳,性能和参数名称),只有基本的考虑你的立场是能够做到这一点的好机会。

The .Net implementation is largely c# so you could diff the recent changes in the java implementation then attempt to recreate them in the .Net code. Since the conversion to c# seems to be largely a direct copy with only basic consideration given to idiomatic c# (camel casing, properties and parameter names) you stand a good chance of being able to do this.

如果你考虑提交的变化作为一个补丁,这将给你让别人来验证您的更改的机会,可以迅速启动的。净方项目受到更密切的同步,在今后的保留。

If you do consider submitting the changes as a patch, this would give you a chance of getting someone else to validate your changes and may jump start the .Net side of the project to be kept more closely in sync in future.

这篇关于参考Java的DLL在C#大会?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆