I’m trying out OpenNI for Kinect and got it to install and run sample code according to
this guide. But now, I want to modify the code and compile it and test it. However, I’m not sure how to compile and run on Linux. I found a guide here that does it for Windows, but can’t seem for the life of me to find anything for Linux.
I did try adapting the Windows code for Linux and tried
javac -cp ~/kinect/OpenNI/Samples/Bin/x86-Release/org.OpenNI.jar VersionInfo.java
java -cp ~/kinect/OpenNI/Samples/Bin/x86-Release/org.OpenNI.jar VersionInfo
but it gives me
Exception in thread "main" java.lang.NoClassDefFoundError: VersionInfo
Caused by: java.lang.ClassNotFoundException: VersionInfo
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: VersionInfo. Program will exit.
Any ideas on how I can compile and run my java code onto the Kinect? If you know how to do it for the Samples in the OpenNI folder, that would be perfect.
Nevermind, figured it out. Turns out I needed to learn about
makeandMakefiles and how they’re used to compile.javafiles into a.jar.