用java加载DLL文件

用java加载DLL文件,java,Java,在RCP应用程序中使用System.loadLibrary方法加载dll文件时,只要我从Eclipse本身启动应用程序,它就可以正常工作。但是,当导出RCP应用程序并从导出的代码启动时,我会遇到以下异常: ERROR - Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help. Try using a 32 bit

在RCP应用程序中使用System.loadLibrary方法加载dll文件时,只要我从Eclipse本身启动应用程序,它就可以正常工作。但是,当导出RCP应用程序并从导出的代码启动时,我会遇到以下异常:

ERROR - Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help. Try using a 32 bit JRE also.
java.lang.UnsatisfiedLinkError: D:\ExportTest\eclipse\plugins\<application_name>\ext\securityinterfaceX86\SecurityInterface-x86.dll: Can't find dependent libraries
错误-无法加载本机代码库。请参阅SWIG Java文档中关于动态链接问题的章节以获取帮助。还可以尝试使用32位JRE。
java.lang.UnsatifiedLink错误:D:\ExportTest\eclipse\plugins\\ext\securityinterfaceEx86\SecurityInterface-x86.dll:找不到依赖库

<代码> > p>您正在从64位JVM加载32位C++二进制文件。您需要使用32位JVM或使用混合模式JVM。使用Eclipse使用的同一个JRE,您会很好。

我的系统有32位JDK和JRE,而且在加载dll时,我检查“system.getProperty(“sun.arch.data.model”)”并且它只返回32位。