简体   繁体   中英

Loading DLL file in java

While loading a dll file, using System.loadLibrary method, in a RCP application, it's working as long as I am launching the application from Eclipse itself. But when exporting the RCP application and launching from the exported code, I am getting this exception :

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

You are loading a 32bit C++ binary from a 64 bit JVM. You need to either use a 32 bit JVM or go for a mixed mode JVM. Use the same JRE that your Eclipse uses and you will be fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM