## Resolving Unsatisfied link error in OpenNI java on Windows

If you are getting any of the following error while trying to Run OpenNI on a windows PC, follow the below steps to rid of the errors (I am assuming you are using Eclipse)

java.lang.UnsatisfiedLinkError: C:\Program Files\OpenNI2\Redist\OpenNI2.jni.dll: Can't find dependent libraries

or

I am also assuming you have installed OpenNI2 in the folder C:\Program Files\OpenNI2

• Then got Run -> Run Configurations and choose the tab named "Arguments"
• In the section "VM Arguments" add the below entry
-Djava.library.path=C:\Progra~1\OpenNI2\Redist\

• Now we have to load the dll manually as below
``` try {