Java
Examples
Name | Description |
---|---|
Demonstrates the basics of OpenNI2 usage |
Prerequisite
Install gradle and Java
Linux:
Windows:
Install JDK, Gradle and Visual Studio (we use VS2019).
Create new Java Project by gradle
Create new folder. In terminal, use gradle to initialize this project folder. Select
application
fortype
andJava
forimplementation language
. Leave default for the rest.
You will have a basic project structure looks like below
Now, create a new folder
libs
in this project. Copyorg.openni.jar
from OpenNI2 SDK intolibs
folder
Edit
build.gradle
, addimplementation files('libs/org.openni.jar')
independencies
section
Modify source file
src/main/java/project_setup/App.java
with following code
Build
Linux
Windows
Expect output
Last updated