java - Unable to load library 'xxx.dll': Native library (win32-x86/xxx.dll) not found in resource path (JNA + DLL + eclipse rcp) -
i'm using jna in eclipse rcp project.
i'm following fragment style.
fragment:` `bundle-symbolicname: a.b.c.d.win32.win32.x86` `bundle-classpath: lib/jna-4.1.0.jar, . ` `eclipse-platformfilter: (& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86))` `bundle-nativecode: xxx.dll;processor=x86; osname=win32,*` `fragment-host: a.b.c.d
xxx.dll directly inside a.b.c.d.win32.win32.x86 fragment project.
host: bundle-symbolicname: a.b.c.d
error get: exception in thread "main" java.lang.unsatisfiedlinkerror: unable load library 'xxx.dll': native library (win32-x86/xxx.dll) not found in resource path
need help.
i'm using jna-4.2.1.
downloaded source , debug.
found jna introduces prefix based on platform.
string libname = name.startswith("/") ? name : nativelibrary.mapsharedlibraryname(name);
string resourcepath = name.startswith("/") ? name : platform.resource_prefix+ "/" + libname;
so included xxx.dll in win32-x86 folder.
still native.loadlibrary(xxx.dll,...)
should refer dll original name.
thanks support.
Comments
Post a Comment