java.library.path中缺少文件 [英] Missing file in java.library.path

查看:244
本文介绍了java.library.path中缺少文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在从openni编译演示时,我偶然发现了此错误:

While compiling a demo from openni i stumbled across this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no OpenNI.jni in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1758)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1045)
at org.OpenNI.NativeMethods.<clinit>(NativeMethods.java:34)
at org.OpenNI.Context.initFromXmlEx(Context.java:317)
at org.OpenNI.Context.createFromXmlFile(Context.java:36)
at kitouch.UserTracker.<init>(UserTracker.java:113)
at kitouch.UserTrackerApplication.main(UserTrackerApplication.java:46)
Java Result: 1
BUILD SUCCESSFUL (total time: 4 seconds)

我正在Mac上执行此操作.我最好的猜测是该文件libOpenNI.jni.dylib不在我的java.library.path

I'm doing this on my mac . And my best guess is that this file libOpenNI.jni.dylib is not in my java.library.path

现在我的问题是:这个猜测正确吗,以及如何在Netbeans的java.library.path中添加libOpenNI.jni.dylib.

My question now is: Is this guess right, and how do i add libOpenNI.jni.dylib to my java.library.path in netbeans.

提前谢谢

推荐答案

将此添加到项目的VM选项中 属性:-Djava.library.path =/Users/olivierjanssens/Development/Kinect/OpenNI/Lib/

add this to VM option of the projects property: -Djava.library.path=/Users/olivierjanssens/Development/Kinect/OpenNI/Lib/

这是dylib文件

这篇关于java.library.path中缺少文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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