Using the Video library on IntelliJ - NoClassDefFoundError
in
Integration and Hardware
•
3 months ago
Hi guys,
I'm developing a Processing sketch with IntelliJ IDEA. I love this IDE and I really recommend it, but for some reason my sketch works fine in the Processing IDE, but I get a NoClassDefFoundError in IntelliJ when I use the Capture class. Any ideas?
Here's the code:
- import processing.core.PApplet;
- import processing.core.PImage;
- import processing.video.Capture;
- public class coketruck extends PApplet{
- Capture cam;
- PImage cocacola;
- boolean activate = false;
- public void setup(){
- size(900,600);
- cocacola = loadImage("cokelogo.JPG");
- String[] cameras = Capture.list();
- cam= new Capture(this, cameras[0]);
- }
- public void draw(){
- if(activate == false){
- image(cocacola,0,0,width,height);
- println("woah");
- }
- else{
- if (cam.available() == true) {
- cam.read();
- }
- image(cam, 0,0,width,height);
- }
- }
- public void mouseClicked(){
- println("hello");
- activate = true;
- cam.start();
- }
- }
- Exception in thread "Animation Thread" java.lang.NoClassDefFoundError: org/gstreamer/elements/BufferDataAppSink$Listener
- at coketruck.setup(coketruck.java:12)
- at processing.core.PApplet.handleDraw(PApplet.java:2241)
- at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:243)
- at processing.core.PApplet.run(PApplet.java:2140)
- at java.lang.Thread.run(Thread.java:680)
- Caused by: java.lang.ClassNotFoundException: org.gstreamer.elements.BufferDataAppSink$Listener
- at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
- at java.security.AccessController.doPrivileged(Native Method)
- at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
- at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
- at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
- at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
- ... 5 more
1