Jna路径解析 [英] Jna path resolving

查看:236
本文介绍了Jna路径解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过jna在eclipse中使用GStreamer。
处理提供了一个库,如果我尝试通过从Eclipse中运行草图来运行代码,但是当我尝试执行整个应用程序时,我会收到一个警告列表(在Camera上) (javaw.exe:3840):GStreamer-WARNING **:无法加载插件'C:/ Users / aaa / Desktop / bbb / ccc / video / library / \windows64\plugins\libgstvorbis.dll':`C:/Users/aaa/Desktop/bbb/ccc/video/library/\windows64\plugins\libgstvorbis.dll':



在140个插件中,有30个以上(可能是我的图书馆为相机管理所需要的)



jna jar和库位于项目文件夹C:/ Users / aaa / Desktop / bbb / ccc / video / library /
中,并包含在构建路径中



,本机代码位于C:/ Users / aaa / Desktop / bbb / ccc / video / library / windows64 / plugins /



路径似乎不正确...



我从来没有写过需要jna的图书馆,如果可能的话,我也试图使用这个库,任何建议?

解决方案

你可以将系统属性 jna.library.path 设置为正在加载的主库的路径。所有这些图书馆的依赖关系都必须在该目录中,或者位于%PATH%



图书馆使用依赖行动者


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?

解决方案

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.

这篇关于Jna路径解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆