java 32位dll,在Java中的64位机器上运行32位dll

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

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!

Sincerely, Ben

解决方案

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.

Your choices are:

Switch to a 32-bit JVM. (You can run a 32bit JVM on a 64-bit OS ...)

Port the DLL to 64-bit.

Switch to an alternative library that is pure Java, or has a 64-bit DLL.

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

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 ...)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值