java.lang.UnsatisfiedLinkError: C:\Program Files\OpenNI2\Redist\OpenNI2.jni.dll: Can't find dependent libraries
or
java.lang.UnsatisfiedLinkError: no OpenNI2.jni in java.library.path
I am also assuming you have installed OpenNI2 in the folder C:\Program Files\OpenNI2
- Make sure you have org.openni.jar in your project and added to your build path
- Then got Run -> Run Configurations and choose the tab named "Arguments"
- In the section "VM Arguments" add the below entry
- Now we have to load the dll manually as below
try { System.load("C:\\Program Files\\OpenNI2\\Tools\\OpenNI2.dll"); ... .. your remaining code here .. OpenNI.shutdown(); } catch (Exception e) { e.printStackTrace(); }