如何在Delphi 7中使用JNI
我需要将 java 应用程序加载到 delphi 项目中。 jre、j3d 和 jdk 位于 delphi 应用程序文件夹中名为 java_files 的文件夹中。 Java 类也存在于同一文件夹中。我需要将这个类加载到delphi应用程序中。我怎样才能做到这一点
I need to load a java application to a delphi project. The jre ,j3d and jdk are present in a folder named java_files within the delphi application folder. Java class also present in the same folder. I need to load this class into delphi application. How can I done this
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这通常是 Delphi 中 JNI 集成的第一个地址:在 Delphi 中使用 Java 本机接口。据我了解您的问题,您想要使用调用API< /em> JNI 的一部分。
This is typically the first address for JNI integration in Delphi: Using the Java Native Interface with Delphi. As I understand your question you want to use the Invocation API part of the JNI.
对JNI delphi 调用的网络搜索发现这是第一个命中:将 Java 本机接口与 Delphi 结合使用。它似乎正是您正在寻找的东西。与您的需求相关的部分是 简介和教程:第三部分 - 调用 API
A websearch for JNI delphi invocation turned up this as the first hit: Using the Java Native Interface with Delphi. It appears to be exactly what you are looking for. The part that is relevant to your needs is Introduction and Tutorial: Part Three - The Invocation API
我就 Java 的 JNI 集成进行了演讲在 Delphi 中(从 Delphi 调用 Java),位于德语 EKON 2007 年 11 会议。讲义为 这里用英语。
当然,它提到了其他人也提到的 JNI with Delphi 上的 Pacifier 页面 。
如果您需要演示源,请告诉我,我会为您挖掘我的档案。
I did a talk on JNI integration from Java in Delphi (calling Java from Delphi) at the German EKON 11 conference in 2007. The handouts are here in English.
Of course it mentions the Pacifier page on JNI with Delphi that the others mentioned as well.
If you need the demo sources, let me know and I'll dig in my archive for you.
我不得不说,作为该产品的作者,我的回答有偏见,但是您是否看过 Java 用于 Delphi?
它是一个 Delphi Java 集成产品,提供 JNI(进程内集成)的所有优点,但没有它的不便,其中包括更短的代码和类型安全。
例如:
I have to say I'm biased in my answer, being the author of the product, but have you had a look at Java for Delphi?
It's a Delphi Java integration product that offers all the benefits of JNI (inprocess integration) but without it's inconveniences, among others much shorter code and it's type safe.
For example: