In this second article on how to develop kinect assisted applications with java, we will be implementing OpenNI java wrapper into Eclipse and make a simple project for starters.
First add all libraries you use for graphics rendering. Lately I’m familiar with LibGDX for doing graphics in Java so i will be adding its jar files into my project then i will include them in Java Build Path -> Libraries. Anyway i will not go into detail in this part because everybody has their choice of graphics library.
Now, let’s show Eclipse where is our Kinect wrappers and native libraries.
1- Click Projects -> Java Build Path -> Libraries
2- Click Add External JARs add select org.OpenNI.jar which is located in “C:Program FilesOpenNISamplesBinRelease”
3- Click Arrow button near Jar file we have just added to expand menu.
4- Double-Click on Native library location and select Jar path which is “C:Program FilesOpenNISamplesBinRelease”
At this stage, we are done with implementing the wrapper. But we need some sample code to test it , right?