Jna path resolving

╄→гoц情女王★ 提交于 2019-12-11 06:46:24

问题


Im trying to use GStreamer in eclipse via jna. Processing provides a library for that and all is fine if i try to run the code by running the sketch as an applet from eclipse, but when i try to execute the whole application i get a list of warnings(on Camera first call) like this one

(javaw.exe:3840): GStreamer-WARNING **: Failed to load plugin 'C:/Users/aaa/Desktop/bbb/ccc/video/library/\windows64\plugins\libgstvorbis.dll': `C:/Users/aaa/Desktop/bbb/ccc/video/library/\windows64\plugins\libgstvorbis.dll': Impossibile trovare il modulo specificato.

on 30+ of 140 plugins (probably the ones needed by my library for the camera managment)

the jna jar and the libraries are in the project folder C:/Users/aaa/Desktop/bbb/ccc/video/library/ and included in the build path

and the native code is in C:/Users/aaa/Desktop/bbb/ccc/video/library/windows64/plugins/

the path doesnt seem correct...

i never wrote libraries that need jna and i was trying to use this library as is if possible, any suggestions?


回答1:


You can set the system property jna.library.path to the path to your primary library that is being loaded. All of that library's dependencies must either be in that directory or on %PATH%.

You can find the dependent libraries using dependency walker.



来源:https://stackoverflow.com/questions/41313120/jna-path-resolving

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!