Missing file in java.library.path

一个人想着一个人 提交于 2019-12-02 13:59:27

问题


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)

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

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

Thx in advance


回答1:


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

this is where the dylib file



来源:https://stackoverflow.com/questions/8361728/missing-file-in-java-library-path

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