tags:

views:

124

answers:

1

I am able to load a DLL library on my machine by putting it in a directory found in the PATH environment variable. I can also specify System.setProperty("jna.library.path","C:\\dev"); and that works. For some reason I cannot get it to work on another box that's running the same version of JBoss.

I tried dropping the DLL in C:\WINDOWS which is in the system PATH variable as well as a few other places and nothing works. Also, I tried putting it in C:\eclipse_dev\jboss-4.2.3.GA\bin which is in the user PATH variable.

The only differences between these machines are that mine is Win XP and the other that's not working is Windows server 2003 and also there are multiple users for windows server 2003, but I still have administrator privileges.

+3  A: 

How is it failing? It could be missing dependent libraries. Try opening the DLL in the Dependency Walker tool. This will tell you whether there are dependent DLLs that can't be found on the system. If the DLL was compiled with Visual Studio, a likely culprit is that the Windows Server 2003 machine is missing the Visual C++ runtime DLLs which must be installed with the redistributable runtime package.

Dave Ray
Ah, installing the redistributable runtime package resolved the issue. Thanks!
ravun
glad I could help.
Dave Ray