从 ac# 类中向 java 提供字符/字符串/字节流

发布于 2024-07-18 06:23:06 字数 132 浏览 4 评论 0原文

我想要运行一个 java 应用程序,在 ac# 类中使用函数/方法(我希望延迟尽可能少!)... c# 函数从 java 应用程序获取一个字符串,并返回一个字符串。必须在 c# 中执行才能在 windows 中创建 OleDbConnection。

I want to have a java app running, using a function/method (with as little delay as possible I hope!) in a c# class...
The c# function takes a string from the java app, and returns a string.. Had to do it in c# to make a OleDbConnection in windows..

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

兰花执着 2024-07-25 06:23:06

我不确定你到底需要什么。

如果您需要从 C# 内部调用 Java 代码,您可以尝试 IKVM

如果您需要启动独立的 Java 应用程序,请使用 .NET 提供的任何工具来生成子进程。

如果您使用 C# 的唯一原因是 OleDbConnection,您可以查看是否有您需要联系的数据库的 Java 驱动程序。 或者 ODBC 驱动程序,并使用 JDBC/ODBC 桥。

I'm not sure what exactly you need.

If you need to call Java code from inside C#, you could try IKVM.

If you need to launch a standalone Java app, use whatever .NET has for spawning subprocesses.

If the only reason why you're using C# is OleDbConnection, you could see if there's a Java driver for the database you need to contact. Or an ODBC driver, and use the JDBC/ODBC bridge.

魂归处 2024-07-25 06:23:06

我是 jni4net 的作者,它是 JVM 和 CLR 之间的开源进程间桥梁。 它构建在 JNI 和 PInvoke 之上。 无需 C/C++ 代码。 我希望它能帮助你。

I am author of jni4net, open source interprocess bridge between JVM and CLR. It's build on top of JNI and PInvoke. No C/C++ code needed. I hope it will help you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文