在ASP.NET中调用jar文件功能 [英] Calling jar file functions in ASP.NET

查看:97
本文介绍了在ASP.NET中调用jar文件功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个jar文件(例如:ABC.jar),该文件具有一个函数(例如:jarfunc()).
我想在ASP.NET(c#)中调用该函数.我正在使用VS2008.
我怎样才能做到这一点??我应该提取罐子还是有其他方法?
请帮忙.

Hi,

I have a jar file (say: ABC.jar), which is having a function (say: jarfunc()).
I want to call that function in ASP.NET (c#). I am using VS 2008.
how can I do this?? should I extract the jar or is there any other way??
Please help.

推荐答案

您好


您的主要问题是洗衣店不兼容

据我了解,Java(jar)和.net(DDL)组装并没有直接的方式可以相互通信.

问题是jar文件做什么?并可以使用.NET
完成同样的操作
如果不是,那么您将不得不使用诸如Netbeans之类的东西来创建Java应用程序来充当中间人

然后,当asp.net应用程序执行函数调用时,该调用将序列化为文件
然后,Java应用程序应查找文件(以线程或其他方式)以提取数据并将响应数据写入文件

当Java编写后,asp.net会在文件中查找更改并从文件中拉回数据

还有其他选项,例如Web服务和TCP IP套接字服务器进行通信

但是长话短说,据我所知,没有明确的方法可以使java和.net相互交谈.

快速的Google搜索确实显示了 http://www.ikvm.net/userguide/tutorial.html [<一个href ="http://www.ikvm.net/userguide/tutorial.html" target ="_ blank" title =新窗口"> ^ ]似乎很有希望.

希望这会有所帮助


哦,我找到了这个

在.NET应用程序中使用Java类 [ ^ ]
Hi


Your main problem is the lanuage incomaptabilities

As far as i understand there is no direct way that Java (jar) and .net (DDL) assembles can talk to each other.

Question is what does the jar file do ? and can the same be done using .NET

If not then you are going to have to create a java application using somethign like Netbeans to act as a kind of middle man

Then when the asp.net application does a function call the call gets serialised into a file
The java app should then look for the file (in a thread or something) pulling the data and writing the response data to the file

While asp.net looks for changes in the file and pulls the data back from the file once java has written

There are other options such as web service and TCP IP socket server to communicate

But Long story short there is no clear cut way as far as i am aware of that there is not clear cut way of making java and .net talk to each other .

A quick google search did bring up http://www.ikvm.net/userguide/tutorial.html[^] which seems to be promising.

Hope this helps


Oh and i found this

Using Java Classes in your .NET Application[^]


您必须使用 http://www.ikvm.net/ [ ^ ].
在解释IKVM用法的页面上,您将找到:

You''ll have to use http://www.ikvm.net/[^].
On the page explaining the uses of IKVM you''ll find:


  1. 嵌入式JVM
  2. 在.NET应用程序中使用Java库
  3. 在Java中开发.NET应用程序


第2项正是您所需要的.

问候,

—曼弗雷德(Manfred)


Item 2. is just what you need.

Regards,

— Manfred


这篇关于在ASP.NET中调用jar文件功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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