Reputation: 223
I have a Problem :D im working on a self generated DLL with JNI. I have generated the DLL with Visual Studio 2013, for 64Bit machines. I have already checked with Dependency Walker if my DLL is really 64 Bit, and it is. Then i tried to use the DLL in my Java source (Eclipse Version: Luna Service Release 1 (4.4.1) Java Version 1.7.0_71-b14 64 Bit Version).
When i run my Java Programm i get the errormessage Can't load IA 32-bit .dll on a AMD 64-bit platform in this line.
static
{
System.loadLibrary("iomemjava");
}
I have already spend 2 days in this problems and searched stackoverflow and some other forums. I'm really out of Ideas what could possibly be wrong.
So far and in the hope you guys and girls can help Martin
Upvotes: 1
Views: 10130
Reputation: 195
go to the link http://www.apache.org/dist/tomcat/tomcat-connectors/native/ find the latest one
download tomcat-native-XXX-win32-bin.zip open the zip file. find the tcnative-1.dll under X64 folder
finally, replace the .dll in the tomcat bin with the .dll in the zip file
Upvotes: 0
Reputation: 206766
Java uses the system property java.library.path
as the path to find native libraries. When you start your application, define this property on the command line with the -D
option and make it point to the directory that contains the DLL. For example:
C:\MyProject> java -Djava.library.path=C:\MyProject\nativelib com.mypackage.MyProgram
where C:\MyProject\nativelib
is the directory that contains the DLL you want to use.
Upvotes: 3