• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 811
  • Last Modified:

Loading a dll in Java For Windows XP

Hello,

I'm attempting to load a dll using the System.loadLibrary("myDllFile") that I built on a linux machine using Makefile.  I get a *java.lang.UnsatisfiedLinkError c:\test\myDllFile.dll: can't load this .dll (machine code=0x101) on a IA 32-bit platform* exception when I run the main java class containing the loadLibrary statement. I'm attempting to run the java class on Windows XP.  Do I need a separate dll for widows xp (32bit) and windows 7 (64 bit)?
0
cgray1223
Asked:
cgray1223
  • 2
1 Solution
 
for_yanCommented:
I'm not sure how could you build a dll on Unix machine and then use it on windows?
0
 
CEHJCommented:
You cross-compiled it from Linux to Windows? Otherwise you can't run it on any Windows architecture
0
 
for_yanCommented:

and this is about compatibility of 32-bit DLL with Windows 64, thosugh tis is not a java question - it is better to ask somehwre MS related:
http://stackoverflow.com/questions/3439845/register-32-bit-com-dll-to-64-bit-windows-7
0
 
gordon_vt02Commented:
Short answer is yes, you need a different DLL for 32-bit and 64-bit platforms.  If you built the DLL targeting a 64-bit platform, you won't be able to load it on Windows XP 32-bit.  Additionally, you'll need to make sure you are using the corresponding JVM (applies only on 64-bit machines).  The 64-bit JVM can't load 32-bit DLLs and vice-versa.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now