Processing 4 + OpenKinect

Hello Processing folks!

I ran into an error running the Open Kinect examples with Processing 4 (on Mac): NoClassDefFoundError: /com/sun/jna/Library.

The issue seems to be with jna.jar.

The Java/Contents folder has jna.jar and jna-platform.jar, these are not in the core/library subfolder. Copying these to the core/library subfolder solves the problem.

5 Likes

Sorry I am not super savvy but very interested into solve this problem. Could you please explain me how to do it? Thank you :pray:t2:

Thanks a lot. That solved the problem

Hello!

Same problem here running Processing 4 from a Mac.

I don´t know where to find those folders as i have many Java folder in my computer.

Any help?

I´ve already solve the Java folder problem and the “NoClassDefFoundError: /com/sun/jna/Library” has gone!

But now my Kinect is now i have another Error

"No Kinect devices found"strong text
Failed to open camera subdevice or it is not disabled.Failed to open motor subddevice or it is not disabled.Failed to open audio subdevice or it is not disabled.There are no kinects, returning null

I have already installed libfreenect from Homebrew in my terminal but still not working. Any help?

Problem solve!

I had to update de libfreenect from Terminal

brew install --HEAD libfreenect

If you’re trying to run the core OpenKinect examples (~Feb 2022), it looks like you need to import the Processing video library to get things to work. Without it, you’ll throw an error like the one described here. This was a fix for me.

import org.openkinect.freenect.*;
import org.openkinect.processing.*;
import processing.video.*; // <-- add this line
1 Like

Bless!! :raised_hands:t3: This was the line I needed!!

Locate Processing.app in the Applications folder
Right-Click → Show Package Contents
Go into folders: Contents > Java


You should find the aforementioned jna*.jar files.
Copy these into the Contents/Java/core/library folder.
Run the sketch again! Should work.

1 Like

Appreciate the answer, I just found this notification. I will try it this week and let you know 🥹