简体   繁体   English

java.library.path中缺少文件

[英]Missing file in java.library.path

While compiling a demo from openni i stumbled across this error: 在从openni编译演示时,我偶然发现了此错误:

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)

I'm doing this on my mac . 我在Mac上执行此操作。 And my best guess is that this file libOpenNI.jni.dylib is not in my java.library.path 我的最佳猜测是该文件libOpenNI.jni.dylib不在我的java.library.path中

My question now is: Is this guess right, and how do i add libOpenNI.jni.dylib to my java.library.path in netbeans. 我现在的问题是:这个猜测正确吗,以及如何在netbeans中将libOpenNI.jni.dylib添加到我的java.library.path中。

Thx in advance 提前Thx

add this to VM option of the projects property: -Djava.library.path=/Users/olivierjanssens/Development/Kinect/OpenNI/Lib/ 将此添加到projects属性的VM选项中:-Djava.library.path = / Users / olivierjanssens / Development / Kinect / OpenNI / Lib /

this is where the dylib file 这是dylib文件的地方

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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