在Java中的64位机器上运行32位dll [英] Running 32-bit dll on 64-bit machine in java

查看:626
本文介绍了在Java中的64位机器上运行32位dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用第三方dll来编写我在Java中编写的程序。不幸的是,它只有32位的支持。当我尝试将dll加载到64位虚拟机时,我收到以下错误:

I am attempting to use a 3rd-party dll for a program I am writing in java. Unfortunately, it only has 32-bit support. When I attempt to load the dll in a 64-bit VM, I get the following error:

Can't load IA 32-bit .dll on a AMD 64-bit platform

我已尝试在32位虚拟机中运行,它在eclipse中工作,但是当我导出项目时,我得到相同的错误。请帮助!

I have tried running in a 32-bit VM, which works in eclipse, but when I export the project, I get the same error. Please help!

诚恳的Ben

推荐答案

64位热点JVM中的32位DLL。它不会奏效而且我不知道支持32位DLL的任何其他64位JVM。

You cannot use a 32-bit DLL in a 64-bit Hotspot JVM. It won't work. And I don't know of any other 64-bit JVM that supports 32-bit DLLs.

您的选择是:


  • 切换到32位JVM。 (您可以在64位操作系统上运行32位JVM ...)

  • 将DLL连接到64位。

  • 切换到纯Java或具有64位DLL的替代库。


我尝试在一个32位虚拟机中运行,这个工作在eclipse中,但是当我导出项目时,我得到了同样的错误。

I have tried running in a 32-bit VM, which works in eclipse, but when I export the project, I get the same error.

这只能意味着您正在运行一个32位JVM来运行Eclipse,而64位JVM可以在Eclipse之外运行应用程序。 (问题是如何运行应用程序,而不是如何导出应用程序...)

That can only mean that you are running a 32-bit JVM to run Eclipse, and a 64-bit JVM to run the application outside of Eclipse. (The issue is how you run the application, not how you export it ...)

这篇关于在Java中的64位机器上运行32位dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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